diff --git a/dist/DiscoSheep.jar b/dist/DiscoSheep.jar index 21a6466..40c298e 100644 Binary files a/dist/DiscoSheep.jar and b/dist/DiscoSheep.jar differ diff --git a/src/gibstick/bukkit/discosheep/DiscoSheepCommandExecutor.java b/src/gibstick/bukkit/discosheep/DiscoSheepCommandExecutor.java index 873e0b2..b1ffaa8 100644 --- a/src/gibstick/bukkit/discosheep/DiscoSheepCommandExecutor.java +++ b/src/gibstick/bukkit/discosheep/DiscoSheepCommandExecutor.java @@ -18,7 +18,7 @@ public class DiscoSheepCommandExecutor implements CommandExecutor { private static final String PERMISSION_PARTY = "discosheep.party"; private static final String PERMISSION_ALL = "discosheep.partyall"; private static final String PERMISSION_FIREWORKS = "discosheep.fireworks"; - private static final String PERMISSION_STOP = "discosheep.stop"; + private static final String PERMISSION_STOPALL = "discosheep.stopall"; private static final String PERMISSION_RELOAD = "discosheep.reload"; private static final String PERMISSION_OTHER = "discosheep.partyother"; @@ -110,15 +110,20 @@ public class DiscoSheepCommandExecutor implements CommandExecutor { } } - private boolean stopCommand(CommandSender sender) { - if (senderHasPerm(sender, PERMISSION_STOP)) { + private boolean stopAllCommand(CommandSender sender) { + if (senderHasPerm(sender, PERMISSION_STOPALL)) { parent.stopAllParties(); return true; } else { - return noPermsMessage(sender, PERMISSION_STOP); + return noPermsMessage(sender, PERMISSION_STOPALL); } } + private boolean stopMeCommand(CommandSender sender) { + parent.stopParty(sender.getName()); + return true; + } + private boolean partySelectCommand(String[] players, CommandSender sender, int _duration, int _sheepNumber, int _radius, int _period, boolean _fireworks) { if (senderHasPerm(sender, PERMISSION_OTHER)) { Player p; @@ -200,8 +205,10 @@ public class DiscoSheepCommandExecutor implements CommandExecutor { if (args[0].equalsIgnoreCase("all")) { return partyAllCommand(player, duration, sheepNumber, radius, period, fireworks); - } else if (args[0].equalsIgnoreCase("stop")) { - return stopCommand(sender); + } else if (args[0].equalsIgnoreCase("stopall")) { + return stopAllCommand(sender); + } else if (args[0].equalsIgnoreCase("stop") && isPlayer) { + return stopMeCommand(sender); } else if (args[0].equalsIgnoreCase("me") && isPlayer) { return partyCommand(player, duration, sheepNumber, radius, period, fireworks); } else if (args[0].equalsIgnoreCase("other")) { diff --git a/src/plugin.yml b/src/plugin.yml index 81b1e23..5f152c5 100644 --- a/src/plugin.yml +++ b/src/plugin.yml @@ -16,7 +16,7 @@ permissions: discosheep.party: true discosheep.partyall: true discosheep.fireworks: true - discosheep.stop: true + discosheep.stopall: true discosheep.reload: true discosheep.party: description: Allows a player to have a party of one @@ -24,7 +24,7 @@ permissions: discosheep.partyall: description: Allows a player to call a server-wide party default: op - discosheep.stop: + discosheep.stopall: description: Allows a player to stop all parties on the server default: op discosheep.fireworks: