implemented -g none to spawn a party without extra guests
This commit is contained in:
parent
20691b0904
commit
23e4a3887f
@ -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) {
|
boolean noPermsMessage(CommandSender sender, String permission) {
|
||||||
sender.sendMessage(ChatColor.RED + "You do not have the permission node " + ChatColor.GRAY + permission);
|
sender.sendMessage(ChatColor.RED + "You do not have the permission node " + ChatColor.GRAY + permission);
|
||||||
return false;
|
return false;
|
||||||
|
@ -149,6 +149,11 @@ public class DiscoSheepCommandExecutor implements CommandExecutor {
|
|||||||
if (!sender.hasPermission(DiscoSheep.PERMISSION_SPAWNGUESTS)) {
|
if (!sender.hasPermission(DiscoSheep.PERMISSION_SPAWNGUESTS)) {
|
||||||
return parent.noPermsMessage(sender, 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);
|
String[] guests = getNextArgs(args, i + 1);
|
||||||
int j = 0;
|
int j = 0;
|
||||||
while (j < guests.length) {
|
while (j < guests.length) {
|
||||||
|
Loading…
Reference in New Issue
Block a user