2015-10-19 17:43:46 +00:00
|
|
|
package me.totalfreedom.totalfreedommod.commands;
|
2012-09-18 14:40:48 +00:00
|
|
|
|
2015-11-15 23:32:04 +00:00
|
|
|
import me.totalfreedom.totalfreedommod.rank.PlayerRank;
|
2012-09-19 02:21:25 +00:00
|
|
|
import org.bukkit.ChatColor;
|
2012-09-18 14:40:48 +00:00
|
|
|
import org.bukkit.command.Command;
|
|
|
|
import org.bukkit.command.CommandSender;
|
|
|
|
import org.bukkit.entity.Player;
|
|
|
|
|
2015-10-19 17:43:46 +00:00
|
|
|
@CommandPermissions(level = PlayerRank.SUPER_ADMIN, source = SourceType.ONLY_CONSOLE, blockHostConsole = true)
|
2015-09-06 14:46:20 +00:00
|
|
|
@CommandParameters(description = "Manage permanently banned players and IPs.", usage = "/<command> reload")
|
2015-10-19 17:43:46 +00:00
|
|
|
public class Command_permban extends FreedomCommand
|
2012-09-18 14:40:48 +00:00
|
|
|
{
|
2015-11-22 18:26:47 +00:00
|
|
|
|
2012-09-18 21:25:37 +00:00
|
|
|
@Override
|
2015-11-22 18:26:47 +00:00
|
|
|
public boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
2012-09-18 14:40:48 +00:00
|
|
|
{
|
2012-09-18 21:25:37 +00:00
|
|
|
if (args.length != 1)
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2015-09-06 14:46:20 +00:00
|
|
|
if (!args[0].equalsIgnoreCase("reload"))
|
2012-11-24 01:22:52 +00:00
|
|
|
{
|
|
|
|
return false;
|
2012-09-18 21:25:37 +00:00
|
|
|
}
|
|
|
|
|
2015-09-06 14:46:20 +00:00
|
|
|
playerMsg("Reloading permban list...", ChatColor.RED);
|
2015-10-19 17:43:46 +00:00
|
|
|
plugin.pb.stop();
|
|
|
|
plugin.pb.start();
|
2015-09-06 14:46:20 +00:00
|
|
|
playerMsg("Reloaded permban list.");
|
2015-10-19 17:43:46 +00:00
|
|
|
playerMsg(plugin.pb.getPermbannedIps().size() + " IPs and "
|
|
|
|
+ plugin.pb.getPermbannedNames().size() + " usernames loaded.");
|
2012-11-24 01:22:52 +00:00
|
|
|
return true;
|
2012-09-18 14:40:48 +00:00
|
|
|
}
|
2012-09-19 02:21:25 +00:00
|
|
|
|
2012-09-18 14:40:48 +00:00
|
|
|
}
|