code cleanup; bugfix
Dieser Commit ist enthalten in:
Ursprung
c6efe8a5f4
Commit
c6459884a0
@ -27,18 +27,24 @@ public class LockschemCommand implements CommandExecutor {
|
|||||||
userGroup != UserGroup.Supporter)
|
userGroup != UserGroup.Supporter)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
switch (args.length) {
|
|
||||||
case 1:
|
|
||||||
String teamName = args[1];
|
|
||||||
FightTeam fightTeam = Fight.getTeamByName(teamName);
|
|
||||||
|
|
||||||
if(fightTeam == null) {
|
if(args.length == 1) {
|
||||||
player.sendMessage(FightSystem.PREFIX + "§cDieses Team existiert nicht!");
|
String teamName = args[0];
|
||||||
return false;
|
FightTeam fightTeam = Fight.getTeamByName(teamName);
|
||||||
}
|
|
||||||
fightTeam.getSchematic().setSchemType(SchematicType.Normal);
|
if(fightTeam == null) {
|
||||||
player.sendMessage(FightSystem.PREFIX + "Schematic von " + fightTeam.getColoredName() + "§cgepserrt!");
|
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;
|
||||||
}
|
}
|
||||||
|
sendHelp(player);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void sendHelp(Player player) {
|
||||||
|
player.sendMessage(FightSystem.PREFIX + "/lockschem [TEAM]");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren