From 34c15a5746e3d7e235b4edb6d45db9ff95e4949d Mon Sep 17 00:00:00 2001 From: Maxetto Date: Fri, 10 Jul 2015 22:44:14 +0200 Subject: [PATCH] Revert sgdc3 fix here. --- .../xephi/authme/commands/AdminCommand.java | 53 +++++++++---------- 1 file changed, 25 insertions(+), 28 deletions(-) diff --git a/src/main/java/fr/xephi/authme/commands/AdminCommand.java b/src/main/java/fr/xephi/authme/commands/AdminCommand.java index 0bc8050d2..02e8faf2b 100644 --- a/src/main/java/fr/xephi/authme/commands/AdminCommand.java +++ b/src/main/java/fr/xephi/authme/commands/AdminCommand.java @@ -107,7 +107,7 @@ public class AdminCommand implements CommandExecutor { return true; } if (Integer.parseInt(args[1]) < 30) { - sender.sendMessage("You can only purge data older than 30 days") + sender.sendMessage("You can only purge data older than 30 days"); return true; } try { @@ -234,39 +234,36 @@ public class AdminCommand implements CommandExecutor { }); return true; } else { - final CommandSender fSender = sender; - final String[] arguments = args; Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() { @Override public void run() { String message = "[AuthMe] "; - if (arguments[1] != null) { - List accountList = plugin.database.getAllAuthsByIp(arguments[1]); - if (accountList.isEmpty() || accountList == null) { - fSender.sendMessage("[AuthMe] Please put a valid IP"); - return; - } - if (accountList.size() == 1) { - fSender.sendMessage("[AuthMe] " + arguments[1] + " is a single account player"); - return; - } - int i = 0; - for (String account : accountList) { - i++; - message = message + account; - if (i != accountList.size()) { - message = message + ", "; - } else { - message = message + "."; - } - } - fSender.sendMessage("[AuthMe] " + arguments[1] + " has " + String.valueOf(accountList.size()) + " accounts"); - fSender.sendMessage(message); - } else { - fSender.sendMessage("[AuthMe] Please put a valid IP"); - return; + if (args[1] == null) { + sender.sendMessage("[AuthMe] Please put a valid IP"); + return true; } + List accountList = plugin.database.getAllAuthsByIp(args[1]); + if (accountList.isEmpty() || accountList == null) { + sender.sendMessage("[AuthMe] This IP does not exist in the database"); + return true; + } + if (accountList.size() == 1) { + sender.sendMessage("[AuthMe] " + args[1] + " is a single account player"); + return true; + } + int i = 0; + for (String account : accountList) { + i++; + message = message + account; + if (i != accountList.size()) { + message = message + ", "; + } else { + message = message + "."; + } + } + sender.sendMessage("[AuthMe] " + args[1] + " has " + String.valueOf(accountList.size()) + " accounts"); + sender.sendMessage(message); } }); return true;