From e5c7042e25083f3d417f8b2eb78618627c8deeaf Mon Sep 17 00:00:00 2001 From: NotMyFault Date: Sat, 29 Dec 2018 13:35:35 +0100 Subject: [PATCH] Fixing error when radius was smaller then 1 --- .../main/java/com/sk89q/worldedit/command/UtilityCommands.java | 1 + 1 file changed, 1 insertion(+) diff --git a/core/src/main/java/com/sk89q/worldedit/command/UtilityCommands.java b/core/src/main/java/com/sk89q/worldedit/command/UtilityCommands.java index 8e9c35e6..2f7ab942 100644 --- a/core/src/main/java/com/sk89q/worldedit/command/UtilityCommands.java +++ b/core/src/main/java/com/sk89q/worldedit/command/UtilityCommands.java @@ -349,6 +349,7 @@ public class UtilityCommands extends MethodCommands { @Logging(PLACEMENT) public void removeNear(Player player, LocalSession session, EditSession editSession, BaseBlock block, @Optional("50") double size) throws WorldEditException { worldEdit.checkMaxRadius(size); + size = Math.max(1, size); int affected = editSession.removeNear(session.getPlacementPosition(player), block.getId(), (int) size); player.print(BBC.getPrefix() + affected + " block(s) have been removed."); }