diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandkickall.java b/Essentials/src/com/earth2me/essentials/commands/Commandkickall.java index e73f57a00..d03a805d5 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandkickall.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandkickall.java @@ -16,13 +16,6 @@ public class Commandkickall extends EssentialsCommand @Override public void run(Server server, Essentials parent, User user, String commandLabel, String[] args) throws Exception { - if (args.length < 1) - { - user.sendMessage("ยง7Usage: /" + commandLabel + ""); - return; - } - - for (Player p : server.getOnlinePlayers()) { if (server.getOnlinePlayers().length == 1 && p.getName().equalsIgnoreCase(user.getName())) @@ -34,7 +27,7 @@ public class Commandkickall extends EssentialsCommand { if (!p.getName().equalsIgnoreCase(user.getName())) { - p.kickPlayer(args.length < 1 ? args[0] : "Kicked from server"); + p.kickPlayer(args.length < 1 ? getFinalArg(args, 0) : "Kicked from server"); } } } @@ -43,13 +36,9 @@ public class Commandkickall extends EssentialsCommand @Override public void run(Server server, Essentials parent, CommandSender sender, String commandLabel, String[] args) throws Exception { - if (args.length < 1) - { - sender.sendMessage("Usage: /" + commandLabel + ""); - return; - } - for (Player p : server.getOnlinePlayers()) - p.kickPlayer(args.length < 1 ? args[0] : "Kicked from server"); + { + p.kickPlayer(args.length < 1 ? getFinalArg(args, 0) : "Kicked from server"); + } } }