Make StringComponent return the correct mode when throwing exception due to missing leading '"'

This commit is contained in:
Alexander Söderberg 2020-09-13 16:17:39 +02:00
parent d60e201502
commit f70227ad7f
No known key found for this signature in database
GPG key ID: C0207FF7EA146678

View file

@ -209,7 +209,7 @@ public final class StringComponent<C extends CommandSender> extends CommandCompo
sj.add(string.substring(1));
started = true;
} else {
return ComponentParseResult.failure(new StringParseException(string, StringMode.GREEDY));
return ComponentParseResult.failure(new StringParseException(string, StringMode.QUOTED));
}
} else if (string.endsWith("\"")) {
sj.add(string.substring(0, string.length() - 1));