From 31e5298f39d5b70419078b77735798ec93951b32 Mon Sep 17 00:00:00 2001 From: Maddy Miller Date: Sat, 4 Jun 2022 16:47:19 +1000 Subject: [PATCH] Fixed //stack erroring when given a count of 0 (#2108) --- .../main/java/com/sk89q/worldedit/command/RegionCommands.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/command/RegionCommands.java b/worldedit-core/src/main/java/com/sk89q/worldedit/command/RegionCommands.java index 410cc5d9e1..ca43de5857 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/command/RegionCommands.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/command/RegionCommands.java @@ -371,6 +371,8 @@ public int stack(Actor actor, World world, EditSession editSession, LocalSession boolean blockUnits, @ArgFlag(name = 'm', desc = "Set the include mask, non-matching blocks become air") Mask mask) throws WorldEditException { + checkCommandArgument(count >= 1, "Count must be >= 1"); + Mask combinedMask; if (ignoreAirBlocks) { if (mask == null) {