mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-30 10:05:59 +00:00
Add /wipeuserdata. Resolves #177
This commit is contained in:
parent
0435174342
commit
bd9d6114ba
@ -1,3 +1,3 @@
|
||||
#Build Number for ANT. Do not edit!
|
||||
#Sun May 11 18:41:12 CEST 2014
|
||||
build.number=830
|
||||
#Sun May 11 19:02:31 CEST 2014
|
||||
build.number=832
|
||||
|
@ -0,0 +1,29 @@
|
||||
package me.StevenLawson.TotalFreedomMod.Commands;
|
||||
|
||||
import java.io.File;
|
||||
import me.StevenLawson.TotalFreedomMod.TFM_Util;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
@CommandPermissions(level = AdminLevel.SENIOR, source = SourceType.ONLY_CONSOLE)
|
||||
@CommandParameters(description = "Removes essentials playerdata", usage = "/<command>")
|
||||
public class Command_wipeuserdata extends TFM_Command
|
||||
{
|
||||
@Override
|
||||
public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)
|
||||
{
|
||||
if (!server.getPluginManager().isPluginEnabled("Essentials"))
|
||||
{
|
||||
playerMsg("Essentials is not enabled on this server");
|
||||
return true;
|
||||
}
|
||||
|
||||
TFM_Util.adminAction(sender.getName(), "Wiping Essentials playerdata", true);
|
||||
|
||||
TFM_Util.deleteFolder(new File(server.getPluginManager().getPlugin("Essentials").getDataFolder(), "userdata"));
|
||||
|
||||
playerMsg("All playerdata deleted.");
|
||||
return true;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user