mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-11-27 20:57:35 +01:00
commit
c2932b3f5d
@ -107,7 +107,7 @@ public class AdminCommand implements CommandExecutor {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (Integer.parseInt(args[1]) < 30) {
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
@ -234,22 +234,23 @@ public class AdminCommand implements CommandExecutor {
|
|||||||
});
|
});
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
final CommandSender fSender = sender;
|
|
||||||
final String[] arguments = args;
|
|
||||||
Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() {
|
Bukkit.getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
String message = "[AuthMe] ";
|
String message = "[AuthMe] ";
|
||||||
if (arguments[1] != null) {
|
if (args[1] == null) {
|
||||||
List<String> accountList = plugin.database.getAllAuthsByIp(arguments[1]);
|
sender.sendMessage("[AuthMe] Please put a valid IP");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
List<String> accountList = plugin.database.getAllAuthsByIp(args[1]);
|
||||||
if (accountList.isEmpty() || accountList == null) {
|
if (accountList.isEmpty() || accountList == null) {
|
||||||
fSender.sendMessage("[AuthMe] Please put a valid IP");
|
sender.sendMessage("[AuthMe] This IP does not exist in the database");
|
||||||
return;
|
return true;
|
||||||
}
|
}
|
||||||
if (accountList.size() == 1) {
|
if (accountList.size() == 1) {
|
||||||
fSender.sendMessage("[AuthMe] " + arguments[1] + " is a single account player");
|
sender.sendMessage("[AuthMe] " + args[1] + " is a single account player");
|
||||||
return;
|
return true;
|
||||||
}
|
}
|
||||||
int i = 0;
|
int i = 0;
|
||||||
for (String account : accountList) {
|
for (String account : accountList) {
|
||||||
@ -261,12 +262,8 @@ public class AdminCommand implements CommandExecutor {
|
|||||||
message = message + ".";
|
message = message + ".";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
fSender.sendMessage("[AuthMe] " + arguments[1] + " has " + String.valueOf(accountList.size()) + " accounts");
|
sender.sendMessage("[AuthMe] " + args[1] + " has " + String.valueOf(accountList.size()) + " accounts");
|
||||||
fSender.sendMessage(message);
|
sender.sendMessage(message);
|
||||||
} else {
|
|
||||||
fSender.sendMessage("[AuthMe] Please put a valid IP");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user