Lemon went too fast

This commit is contained in:
ZeroEpoch1969 2018-03-25 17:12:47 -07:00
parent 1080893be4
commit affe77c203
No known key found for this signature in database
GPG Key ID: E0AAB104FB9F8FDF

View File

@ -15,10 +15,33 @@ public class Command_playerverify extends FreedomCommand
@Override @Override
protected boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole) protected boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
{ {
if (args.length == 1)
{
if (args[0].equalsIgnoreCase("clearips"))
{
VPlayer data = plugin.pv.getVerificationPlayer(playerSender);
int cleared = 0;
for (String ip : data.getIPs())
{
if (!ip.equals(Ips.getIp(playerSender)))
{
data.removeIp(ip);
cleared++;
}
}
msg("Cleared all IP's except your current IP \"" + Ips.getIp(playerSender) + "\"");
msg("Cleared " + cleared + " IP's.");
plugin.pv.saveVerificationData(data);
return true;
}
}
if (args.length < 2) if (args.length < 2)
{ {
return false; return false;
} }
if (plugin.al.isAdmin(sender)) if (plugin.al.isAdmin(sender))
{ {
msg("This command is only for OP's.", ChatColor.RED); msg("This command is only for OP's.", ChatColor.RED);
@ -87,21 +110,6 @@ public class Command_playerverify extends FreedomCommand
default: default:
return false; return false;
} }
case "clearips":
VPlayer data = plugin.pv.getVerificationPlayer(playerSender);
int cleared = 0;
for (String ip : data.getIPs())
{
if (!ip.equals(Ips.getIp(playerSender)))
{
data.removeIp(ip);
cleared++;
}
}
msg("Cleared all IP's except your current IP \"" + Ips.getIp(playerSender) + "\"");
msg("Cleared " + cleared + " IP's.");
plugin.pv.saveVerificationData(data);
return true;
default: default:
return false; return false;
} }