mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-06-26 14:31:45 +00:00
a0058869c9
Moved resources to correct folder Fixed and improved build information, no longer tracking build.properties
32 lines
1.1 KiB
Java
32 lines
1.1 KiB
Java
package me.totalfreedom.totalfreedommod.commands;
|
|
|
|
import java.io.File;
|
|
import me.totalfreedom.totalfreedommod.rank.PlayerRank;
|
|
import me.totalfreedom.totalfreedommod.util.FUtil;
|
|
import org.bukkit.command.Command;
|
|
import org.bukkit.command.CommandSender;
|
|
import org.bukkit.entity.Player;
|
|
|
|
@CommandPermissions(level = PlayerRank.SENIOR_ADMIN, source = SourceType.ONLY_CONSOLE, blockHostConsole = true)
|
|
@CommandParameters(description = "Removes essentials playerdata", usage = "/<command>")
|
|
public class Command_wipeuserdata extends FreedomCommand
|
|
{
|
|
|
|
@Override
|
|
public boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
|
{
|
|
if (!server.getPluginManager().isPluginEnabled("Essentials"))
|
|
{
|
|
playerMsg("Essentials is not enabled on this server");
|
|
return true;
|
|
}
|
|
|
|
FUtil.adminAction(sender.getName(), "Wiping Essentials playerdata", true);
|
|
|
|
FUtil.deleteFolder(new File(server.getPluginManager().getPlugin("Essentials").getDataFolder(), "userdata"));
|
|
|
|
playerMsg("All playerdata deleted.");
|
|
return true;
|
|
}
|
|
}
|