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,19 +28,20 @@ public class LockschemCommand implements CommandExecutor {
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|
||||||
if(args.length == 1) {
|
if(args.length != 1) {
|
||||||
String teamName = args[0];
|
sendHelp(player);
|
||||||
FightTeam fightTeam = Fight.getTeamByName(teamName);
|
|
||||||
|
|
||||||
if(fightTeam == null) {
|
|
||||||
player.sendMessage(FightSystem.PREFIX + "§cDieses Team existiert nicht!");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
fightTeam.getSchematic().setSchemType(SchematicType.Normal);
|
|
||||||
player.sendMessage(FightSystem.PREFIX + "Schematic von " + fightTeam.getColoredName() + " §cgesperrt!");
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
sendHelp(player);
|
|
||||||
|
String teamName = args[0];
|
||||||
|
FightTeam fightTeam = Fight.getTeamByName(teamName);
|
||||||
|
|
||||||
|
if(fightTeam == null) {
|
||||||
|
player.sendMessage(FightSystem.PREFIX + "§cDieses Team existiert nicht!");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
fightTeam.getSchematic().setSchemType(SchematicType.Normal);
|
||||||
|
player.sendMessage(FightSystem.PREFIX + "Schematic von " + fightTeam.getColoredName() + " §cgesperrt!");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren