TotalFreedomMod/src/main/java/me/totalfreedom/totalfreedommod/command/Command_permban.java

37 lines
1.1 KiB
Java
Raw Normal View History

package me.totalfreedom.totalfreedommod.command;
2012-09-18 14:40:48 +00:00
import me.totalfreedom.totalfreedommod.rank.Rank;
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;
@CommandPermissions(level = Rank.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")
public class Command_permban extends FreedomCommand
2012-09-18 14:40:48 +00:00
{
@Override
public boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
2012-09-18 14:40:48 +00:00
{
if (args.length != 1)
{
return false;
}
2015-09-06 14:46:20 +00:00
if (!args[0].equalsIgnoreCase("reload"))
{
return false;
}
msg("Reloading permban list...", ChatColor.RED);
plugin.pb.stop();
plugin.pb.start();
msg("Reloaded permban list.");
msg(plugin.pb.getPermbannedIps().size() + " IPs and "
+ plugin.pb.getPermbannedNames().size() + " usernames loaded.");
return true;
2012-09-18 14:40:48 +00:00
}
2012-09-18 14:40:48 +00:00
}