mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-17 04:46:11 +00:00
36 lines
1.2 KiB
Java
36 lines
1.2 KiB
Java
|
package me.totalfreedom.totalfreedommod.command;
|
||
|
|
||
|
import java.io.File;
|
||
|
import me.totalfreedom.totalfreedommod.rank.Rank;
|
||
|
import me.totalfreedom.totalfreedommod.util.FUtil;
|
||
|
import org.bukkit.command.Command;
|
||
|
import org.bukkit.command.CommandSender;
|
||
|
import org.bukkit.entity.Player;
|
||
|
|
||
|
@CommandPermissions(level = Rank.SENIOR_ADMIN, source = SourceType.ONLY_CONSOLE, blockHostConsole = true)
|
||
|
@CommandParameters(description = "Removes essentials warps", usage = "/<command>")
|
||
|
public class Command_wipewarps extends FreedomCommand
|
||
|
{
|
||
|
|
||
|
|
||
|
@Override
|
||
|
public boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
||
|
{
|
||
|
if (!server.getPluginManager().isPluginEnabled("Essentials"))
|
||
|
{
|
||
|
msg("Essentials is not enabled on this server");
|
||
|
return true;
|
||
|
}
|
||
|
|
||
|
FUtil.adminAction(sender.getName(), "Wiping Essentials Warps", true);
|
||
|
|
||
|
FUtil.deleteFolder(new File(server.getPluginManager().getPlugin("Essentials").getDataFolder(), "warps"));
|
||
|
|
||
|
server.dispatchCommand(sender, "plc reload essentials");
|
||
|
|
||
|
msg("All warps deleted.");
|
||
|
return true;
|
||
|
|
||
|
}
|
||
|
}
|