Update Command_wipewarps.java

This commit is contained in:
Lemon 2017-11-27 12:16:26 +05:00 committed by GitHub
parent 75c0db71ff
commit 77131c2138
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -21,13 +21,11 @@ public class Command_wipewarps extends FreedomCommand
msg("Essentials is not enabled on this server");
return true;
}
Plugin essentials = server.getPluginManager().getPlugin("Essentials");
FUtil.adminAction(sender.getName(), "Wiping Essentials Warps", true);
FUtil.deleteFolder(new File(server.getPluginManager().getPlugin("Essentials").getDataFolder(), "warps"));
server.dispatchCommand(sender, "plc reload essentials");
server.getPluginManager().disablePlugin(essentials);
FUtil.deleteFolder(new File(essentials.getDataFolder(), "warps"));
server.getPluginManager().enablePlugin(essentials);
msg("All warps deleted.");
return true;