implemented -g none to spawn a party without extra guests

This commit is contained in:
Gibstick 2013-07-26 21:29:06 -04:00
parent 20691b0904
commit 23e4a3887f
2 changed files with 20 additions and 10 deletions

View File

@ -281,6 +281,11 @@ public final class DiscoSheep extends JavaPlugin {
}
boolean zeroGuests(DiscoParty party) {
party.getGuestNumbers().clear();
return true;
}
boolean noPermsMessage(CommandSender sender, String permission) {
sender.sendMessage(ChatColor.RED + "You do not have the permission node " + ChatColor.GRAY + permission);
return false;

View File

@ -149,6 +149,11 @@ public class DiscoSheepCommandExecutor implements CommandExecutor {
if (!sender.hasPermission(DiscoSheep.PERMISSION_SPAWNGUESTS)) {
return parent.noPermsMessage(sender, DiscoSheep.PERMISSION_SPAWNGUESTS);
}
if (parseNextArg(args, i, "none")) {
return parent.zeroGuests(mainParty);
}
String[] guests = getNextArgs(args, i + 1);
int j = 0;
while (j < guests.length) {