diff --git a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_rd.java b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_rd.java index 3a5e66e..0478d78 100644 --- a/src/me/StevenLawson/TotalFreedomMod/Commands/Command_rd.java +++ b/src/me/StevenLawson/TotalFreedomMod/Commands/Command_rd.java @@ -13,27 +13,14 @@ public class Command_rd extends TFM_Command @Override public boolean run(CommandSender sender, Player sender_p, Command cmd, String commandLabel, String[] args, boolean senderIsConsole) { - if (senderIsConsole || sender.isOp()) + if (!(senderIsConsole || TFM_Util.isUserSuperadmin(sender))) { - if (args.length == 1) - { - if (Arrays.asList("minecart", "minecarts", "cart", "carts").contains(args[0].toLowerCase())) - { - sender.sendMessage(ChatColor.GRAY + "Removing all projectiles, dropped items, exp. orbs, primed explosives, and minecarts."); - sender.sendMessage(ChatColor.GRAY + String.valueOf(TFM_Util.wipeEntities(true, true)) + " enties removed."); - } - } - else - { - sender.sendMessage(ChatColor.GRAY + "Removing all projectiles, dropped items, exp. orbs and primed explosives."); - sender.sendMessage(ChatColor.GRAY + String.valueOf(TFM_Util.wipeEntities(true)) + " enties removed."); - } + sender.sendMessage(TotalFreedomMod.MSG_NO_PERMS); + return true; } - else - { - sender.sendMessage(TotalFreedomMod.MSG_NO_PERMS); - } - + TFM_Util.adminAction(sender.getName(), "Removing all server entities", false); + sender.sendMessage(ChatColor.GRAY + String.valueOf(TFM_Util.wipeEntities(true, true)) + " enties removed."); + return true; } }