From cf6f54bd285ebc08c97556a7b4db3d5bfb2f8153 Mon Sep 17 00:00:00 2001 From: dordsor21 Date: Tue, 16 Nov 2021 12:19:08 +0000 Subject: [PATCH] Fix RichParser suggestion sometimes giving a different pattern/mask when specifying arguments --- .../core/extension/factory/parser/RichParser.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/RichParser.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/RichParser.java index 2c6d27815..e82580dfe 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/RichParser.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extension/factory/parser/RichParser.java @@ -44,7 +44,11 @@ public abstract class RichParser extends InputParser implements AliasedPar if (prefix.length() > other.length()) { return prefix.startsWith(other); } - return other.startsWith(prefix); + int i = other.indexOf('['); + if (i == -1) { + return other.startsWith(prefix); + } + return other.substring(0, i).equalsIgnoreCase(prefix); }; }