mirror of
https://github.com/TheDeus-Group/TFM-4.3-Reloaded.git
synced 2024-12-23 08:15:18 +00:00
Made /rd simpler
This commit is contained in:
parent
92110f78c4
commit
013dd1d2cc
1 changed files with 6 additions and 19 deletions
|
@ -13,26 +13,13 @@ 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 (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.");
|
||||
}
|
||||
}
|
||||
else
|
||||
if (!(senderIsConsole || TFM_Util.isUserSuperadmin(sender)))
|
||||
{
|
||||
sender.sendMessage(TotalFreedomMod.MSG_NO_PERMS);
|
||||
return true;
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue