mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-16 20:36:12 +00:00
37 lines
1.1 KiB
Java
37 lines
1.1 KiB
Java
package me.totalfreedom.totalfreedommod.command;
|
|
|
|
import me.totalfreedom.totalfreedommod.rank.Rank;
|
|
import org.bukkit.ChatColor;
|
|
import org.bukkit.command.Command;
|
|
import org.bukkit.command.CommandSender;
|
|
import org.bukkit.entity.Player;
|
|
|
|
@CommandPermissions(level = Rank.SENIOR_ADMIN, source = SourceType.BOTH)
|
|
@CommandParameters(description = "Manage permanently banned players and IPs.", usage = "/<command> reload")
|
|
public class Command_permban extends FreedomCommand
|
|
{
|
|
|
|
@Override
|
|
public boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
|
{
|
|
if (args.length != 1)
|
|
{
|
|
return false;
|
|
}
|
|
|
|
if (!args[0].equalsIgnoreCase("reload"))
|
|
{
|
|
return false;
|
|
}
|
|
|
|
msg("Reloading permban list...", ChatColor.RED);
|
|
plugin.pm.stop();
|
|
plugin.pm.start();
|
|
msg("Reloaded permban list.");
|
|
msg(plugin.pm.getPermbannedIps().size() + " IPs and "
|
|
+ plugin.pm.getPermbannedNames().size() + " usernames loaded.");
|
|
return true;
|
|
}
|
|
|
|
}
|