diff --git a/src/ca/gibstick/discosheep/DiscoSheep.java b/src/ca/gibstick/discosheep/DiscoSheep.java index f7838cc..ef5ec0f 100644 --- a/src/ca/gibstick/discosheep/DiscoSheep.java +++ b/src/ca/gibstick/discosheep/DiscoSheep.java @@ -125,12 +125,12 @@ public final class DiscoSheep extends JavaPlugin { return true; } - boolean stopMeCommand(CommandSender sender, DiscoSheepCommandExecutor discoSheepCommandExecutor) { + boolean stopMeCommand(CommandSender sender) { stopParty(sender.getName()); return true; } - boolean stopAllCommand(CommandSender sender, DiscoSheepCommandExecutor discoSheepCommandExecutor) { + boolean stopAllCommand(CommandSender sender) { if (sender.hasPermission(DiscoSheep.PERMISSION_STOPALL)) { stopAllParties(); return true; @@ -139,7 +139,7 @@ public final class DiscoSheep extends JavaPlugin { } } - boolean partyCommand(Player player, DiscoParty party, DiscoSheepCommandExecutor discoSheepCommandExecutor) { + boolean partyCommand(Player player, DiscoParty party) { if (player.hasPermission(DiscoSheep.PERMISSION_PARTY)) { if (!hasParty(player.getName())) { party.setPlayer(player); @@ -153,7 +153,7 @@ public final class DiscoSheep extends JavaPlugin { } } - boolean reloadCommand(CommandSender sender, DiscoSheepCommandExecutor discoSheepCommandExecutor) { + boolean reloadCommand(CommandSender sender) { if (sender.hasPermission(DiscoSheep.PERMISSION_RELOAD)) { reloadConfigFromDisk(); sender.sendMessage(ChatColor.GREEN + "DiscoSheep config reloaded from disk"); @@ -163,7 +163,7 @@ public final class DiscoSheep extends JavaPlugin { } } - boolean partyOtherCommand(String[] players, CommandSender sender, DiscoParty party, DiscoSheepCommandExecutor discoSheepCommandExecutor) { + boolean partyOtherCommand(String[] players, CommandSender sender, DiscoParty party) { if (sender.hasPermission(DiscoSheep.PERMISSION_OTHER)) { Player p; for (String playerName : players) { @@ -183,7 +183,7 @@ public final class DiscoSheep extends JavaPlugin { } } - boolean partyAllCommand(CommandSender sender, DiscoParty party, DiscoSheepCommandExecutor discoSheepCommandExecutor) { + boolean partyAllCommand(CommandSender sender, DiscoParty party) { if (sender.hasPermission(DiscoSheep.PERMISSION_ALL)) { for (Player p : Bukkit.getServer().getOnlinePlayers()) { if (!hasParty(p.getName())) { diff --git a/src/ca/gibstick/discosheep/DiscoSheepCommandExecutor.java b/src/ca/gibstick/discosheep/DiscoSheepCommandExecutor.java index b21b8b8..362e94b 100644 --- a/src/ca/gibstick/discosheep/DiscoSheepCommandExecutor.java +++ b/src/ca/gibstick/discosheep/DiscoSheepCommandExecutor.java @@ -71,13 +71,13 @@ public class DiscoSheepCommandExecutor implements CommandExecutor { // prevent needless construction of parties if (args.length == 1) { if (args[0].equalsIgnoreCase("stopall")) { - return parent.stopAllCommand(sender, this); + return parent.stopAllCommand(sender); } else if (args[0].equalsIgnoreCase("stop") && isPlayer) { - return parent.stopMeCommand(sender, this); + return parent.stopMeCommand(sender); } else if (args[0].equalsIgnoreCase("help")) { return parent.helpCommand(sender); } else if (args[0].equalsIgnoreCase("reload")) { - return parent.reloadCommand(sender, this); + return parent.reloadCommand(sender); } } @@ -143,11 +143,11 @@ public class DiscoSheepCommandExecutor implements CommandExecutor { if (args.length > 0) { if (args[0].equalsIgnoreCase("all")) { - return parent.partyAllCommand(sender, mainParty, this); + return parent.partyAllCommand(sender, mainParty); } else if (args[0].equalsIgnoreCase("me") && isPlayer) { - return parent.partyCommand(player, mainParty, this); + return parent.partyCommand(player, mainParty); } else if (args[0].equalsIgnoreCase("other")) { - return parent.partyOtherCommand(parsePlayerList(args, 1), sender, mainParty, this); + return parent.partyOtherCommand(parsePlayerList(args, 1), sender, mainParty); } else { sender.sendMessage(ChatColor.RED + "Invalid argument (certain commands do not work from console)."); return false;