Use the correct failure reason for quoted StringArguments

This commit is contained in:
jmp 2020-10-15 13:11:30 -07:00 committed by Alexander Söderberg
parent 6c63b47e5e
commit 9bfb0f17d6

View file

@ -344,8 +344,8 @@ public final class StringArgument<C> extends CommandArgument<C, String> {
inputQueue.remove();
}
if (this.stringMode == StringMode.QUOTED && (!started || !finished)) {
return ArgumentParseResult.failure(new StringParseException(sj.toString(), StringMode.GREEDY, commandContext));
if (this.stringMode == StringMode.QUOTED && !finished) {
return ArgumentParseResult.failure(new StringParseException(sj.toString(), StringMode.QUOTED, commandContext));
}
return ArgumentParseResult.success(sj.toString());