From 60dc164cdc0fc4671c31c518076cd8eec53784e0 Mon Sep 17 00:00:00 2001 From: themode Date: Thu, 11 Mar 2021 00:19:55 +0100 Subject: [PATCH] Prevent quote(s) in the middle of inputs --- .../server/command/builder/arguments/ArgumentString.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/net/minestom/server/command/builder/arguments/ArgumentString.java b/src/main/java/net/minestom/server/command/builder/arguments/ArgumentString.java index 28df50e24..c39cdcdcf 100644 --- a/src/main/java/net/minestom/server/command/builder/arguments/ArgumentString.java +++ b/src/main/java/net/minestom/server/command/builder/arguments/ArgumentString.java @@ -44,8 +44,7 @@ public class ArgumentString extends Argument { public static String staticParse(@NotNull String input) throws ArgumentSyntaxException { // Return if not quoted - if (!input.startsWith(String.valueOf(StringUtil.DOUBLE_QUOTE)) && - !input.endsWith(String.valueOf(StringUtil.DOUBLE_QUOTE)) && + if (!input.contains(String.valueOf(StringUtil.DOUBLE_QUOTE)) && !input.contains(String.valueOf(StringUtil.SPACE))) { return input; }