mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-27 01:05:38 +00:00
Add adminAction messages to /ro.
This commit is contained in:
parent
93d390c96a
commit
0ec8c5bc32
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user