From cba7c21ce5842d17f5cb6a3aa1f30a6060cdd168 Mon Sep 17 00:00:00 2001 From: mrlasagne <61229161+mrlasagne@users.noreply.github.com> Date: Mon, 13 Apr 2020 22:34:15 +0200 Subject: [PATCH] Fix special masks issue This fixes the issue where masks other than SimpleBlock masks (like Offset mask or negate mask) would not work. The issue was caused by parseFromListInput() who would throw SuggestInputParseException if the input was not a valid block definition. But as the parser was catching NoMatchException only, this was causing an error and the MaskFactory was broken. --- .../extension/factory/parser/mask/BlocksMaskParser.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/extension/factory/parser/mask/BlocksMaskParser.java b/worldedit-core/src/main/java/com/sk89q/worldedit/extension/factory/parser/mask/BlocksMaskParser.java index c4208dd94..d66d59ba9 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/extension/factory/parser/mask/BlocksMaskParser.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/extension/factory/parser/mask/BlocksMaskParser.java @@ -56,7 +56,7 @@ public class BlocksMaskParser extends InputParser { return null; } return new BlockMask(context.getExtent(), holders); - } catch (NoMatchException e) { + } catch (InputParseException e) { return null; } }