TotalFreedomMod/src/main/java/me/totalfreedom/totalfreedommod/command/Command_indefban.java
2020-08-09 17:49:35 -07:00

34 lines
983 B
Java

package me.totalfreedom.totalfreedommod.command;
import me.totalfreedom.totalfreedommod.rank.Rank;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
@CommandPermissions(level = Rank.SENIOR_ADMIN, source = SourceType.ONLY_CONSOLE)
@CommandParameters(description = "Reload the indefinite ban list.", usage = "/<command> reload", aliases = "ib")
public class Command_indefban 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 the indefinite ban list...");
plugin.im.onStop();
plugin.im.onStart();
msg("Reloaded the indefinite ban list.");
return true;
}
}