Add adminAction messages to /ro.

This commit is contained in:
Steven Lawson 2012-12-01 15:45:50 -05:00
parent 93d390c96a
commit 0ec8c5bc32

View File

@ -36,7 +36,7 @@ public class Command_ro extends TFM_Command
} }
} }
int radius = 25; int radius = 20;
if (args.length >= 2) if (args.length >= 2)
{ {
try try
@ -66,6 +66,7 @@ public class Command_ro extends TFM_Command
if (target_player == null) if (target_player == null)
{ {
TFM_Util.adminAction(sender.getName(), "Removing all " + from_material.name() + " within " + radius + " blocks of all players.", senderIsConsole);
for (Player p : server.getOnlinePlayers()) for (Player p : server.getOnlinePlayers())
{ {
TFM_Util.replaceBlocks(p.getLocation(), from_material, Material.AIR, radius); TFM_Util.replaceBlocks(p.getLocation(), from_material, Material.AIR, radius);
@ -73,9 +74,12 @@ public class Command_ro extends TFM_Command
} }
else else
{ {
TFM_Util.adminAction(sender.getName(), "Removing all " + from_material.name() + " within " + radius + " blocks of " + target_player.getName() + ".", senderIsConsole);
TFM_Util.replaceBlocks(target_player.getLocation(), from_material, Material.AIR, radius); TFM_Util.replaceBlocks(target_player.getLocation(), from_material, Material.AIR, radius);
} }
TFM_Util.adminAction(sender.getName(), "Remove complete.", senderIsConsole);
return true; return true;
} }
} }