mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-02 03:16:41 +00:00
Allow remove command to be used from console
This commit is contained in:
@ -450,6 +450,7 @@ public class UtilityCommands {
|
||||
)
|
||||
@CommandPermissions("worldedit.remove")
|
||||
@Logging(PLACEMENT)
|
||||
@Console
|
||||
public void remove(CommandContext args, LocalSession session, LocalPlayer player,
|
||||
EditSession editSession) throws WorldEditException {
|
||||
|
||||
@ -491,8 +492,15 @@ public class UtilityCommands {
|
||||
return;
|
||||
}
|
||||
|
||||
Vector origin = session.getPlacementPosition(player);
|
||||
int removed = player.getWorld().removeEntities(type, origin, radius);
|
||||
int removed = 0;
|
||||
if (player.isPlayer()) {
|
||||
Vector origin = session.getPlacementPosition(player);
|
||||
removed = player.getWorld().removeEntities(type, origin, radius);
|
||||
} else {
|
||||
for (LocalWorld world : we.getServer().getWorlds()) {
|
||||
removed += world.removeEntities(type, new Vector(), radius);
|
||||
}
|
||||
}
|
||||
player.print("Marked " + removed + " entit(ies) for removal.");
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user