Add usage string.

This commit is contained in:
GJ 2013-02-11 15:24:20 -05:00
parent 1c0e392552
commit a597a7d281

View File

@ -23,25 +23,33 @@ public class PartyDisbandCommand implements CommandExecutor {
return true; return true;
} }
player = (Player) sender; switch (args.length) {
playerParty = Users.getPlayer(player).getParty(); case 1:
player = (Player) sender;
playerParty = Users.getPlayer(player).getParty();
if (!playerParty.getLeader().equals(player.getName())) { if (!playerParty.getLeader().equals(player.getName())) {
sender.sendMessage(LocaleLoader.getString("Party.NotOwner")); sender.sendMessage(LocaleLoader.getString("Party.NotOwner"));
return true;
}
for (Player member : playerParty.getOnlineMembers()) {
if (!PartyManager.handlePartyChangeEvent(member, playerParty.getName(), null, EventReason.KICKED_FROM_PARTY)) {
return true; return true;
} }
member.sendMessage(LocaleLoader.getString("Party.Disband")); for (Player member : playerParty.getOnlineMembers()) {
if (!PartyManager.handlePartyChangeEvent(member, playerParty.getName(), null, EventReason.KICKED_FROM_PARTY)) {
return true;
}
member.sendMessage(LocaleLoader.getString("Party.Disband"));
}
PartyManager.disbandParty(playerParty);
return true;
default:
sender.sendMessage(LocaleLoader.getString("Commands.Usage.1", "party", "disband"));
return true;
} }
PartyManager.disbandParty(playerParty);
return true;
} }
} }