Prevent quote(s) in the middle of inputs

This commit is contained in:
themode 2021-03-11 00:19:55 +01:00
parent 060a148b60
commit 60dc164cdc

View File

@ -44,8 +44,7 @@ public class ArgumentString extends Argument<String> {
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;
}