Revert sgdc3 fix here.

This commit is contained in:
Maxetto 2015-07-10 22:44:14 +02:00
parent 925e78e860
commit 34c15a5746

View File

@ -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,22 +234,23 @@ 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<String> accountList = plugin.database.getAllAuthsByIp(arguments[1]);
if (args[1] == null) {
sender.sendMessage("[AuthMe] Please put a valid IP");
return true;
}
List<String> accountList = plugin.database.getAllAuthsByIp(args[1]);
if (accountList.isEmpty() || accountList == null) {
fSender.sendMessage("[AuthMe] Please put a valid IP");
return;
sender.sendMessage("[AuthMe] This IP does not exist in the database");
return true;
}
if (accountList.size() == 1) {
fSender.sendMessage("[AuthMe] " + arguments[1] + " is a single account player");
return;
sender.sendMessage("[AuthMe] " + args[1] + " is a single account player");
return true;
}
int i = 0;
for (String account : accountList) {
@ -261,12 +262,8 @@ public class AdminCommand implements CommandExecutor {
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;
}
sender.sendMessage("[AuthMe] " + args[1] + " has " + String.valueOf(accountList.size()) + " accounts");
sender.sendMessage(message);
}
});
return true;