code cleanup
Dieser Commit ist enthalten in:
Ursprung
284542e23d
Commit
feb7939ee7
@ -14,9 +14,8 @@ import org.bukkit.entity.Player;
|
|||||||
public class LockschemCommand implements CommandExecutor {
|
public class LockschemCommand implements CommandExecutor {
|
||||||
@Override
|
@Override
|
||||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||||
if(!(sender instanceof Player)) {
|
if(!(sender instanceof Player))
|
||||||
return false;
|
return false;
|
||||||
}
|
|
||||||
Player player = (Player) sender;
|
Player player = (Player) sender;
|
||||||
|
|
||||||
SteamwarUser steamwarUser = SteamwarUser.get(player.getUniqueId());
|
SteamwarUser steamwarUser = SteamwarUser.get(player.getUniqueId());
|
||||||
@ -29,7 +28,11 @@ public class LockschemCommand implements CommandExecutor {
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|
||||||
if(args.length == 1) {
|
if(args.length != 1) {
|
||||||
|
sendHelp(player);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
String teamName = args[0];
|
String teamName = args[0];
|
||||||
FightTeam fightTeam = Fight.getTeamByName(teamName);
|
FightTeam fightTeam = Fight.getTeamByName(teamName);
|
||||||
|
|
||||||
@ -41,9 +44,6 @@ public class LockschemCommand implements CommandExecutor {
|
|||||||
player.sendMessage(FightSystem.PREFIX + "Schematic von " + fightTeam.getColoredName() + " §cgesperrt!");
|
player.sendMessage(FightSystem.PREFIX + "Schematic von " + fightTeam.getColoredName() + " §cgesperrt!");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
sendHelp(player);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void sendHelp(Player player) {
|
private void sendHelp(Player player) {
|
||||||
player.sendMessage(FightSystem.PREFIX + "/lockschem [TEAM]");
|
player.sendMessage(FightSystem.PREFIX + "/lockschem [TEAM]");
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren