From 193361ac3261a64e0a532be2af8486a4a150019a Mon Sep 17 00:00:00 2001 From: SirYwell Date: Sat, 29 Dec 2018 08:47:57 +0100 Subject: [PATCH] fix //removenear exception for size < 1 --- .../main/java/com/sk89q/worldedit/command/UtilityCommands.java | 1 + 1 file changed, 1 insertion(+) diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/command/UtilityCommands.java b/worldedit-core/src/main/java/com/sk89q/worldedit/command/UtilityCommands.java index b4caa5208..bf96065a9 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/command/UtilityCommands.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/command/UtilityCommands.java @@ -366,6 +366,7 @@ public class UtilityCommands extends MethodCommands { @Logging(PLACEMENT) public void removeNear(Player player, LocalSession session, EditSession editSession, Mask mask, @Optional("50") double size) throws WorldEditException { worldEdit.checkMaxRadius(size); + size = Math.max(1, size); int affected = editSession.removeNear(session.getPlacementPosition(player), mask, (int) size); player.print(BBC.getPrefix() + affected + " block(s) have been removed."); }