✨ Use the correct failure reason for quoted StringArguments
This commit is contained in:
parent
6c63b47e5e
commit
9bfb0f17d6
1 changed files with 2 additions and 2 deletions
|
|
@ -344,8 +344,8 @@ public final class StringArgument<C> extends CommandArgument<C, String> {
|
||||||
inputQueue.remove();
|
inputQueue.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.stringMode == StringMode.QUOTED && (!started || !finished)) {
|
if (this.stringMode == StringMode.QUOTED && !finished) {
|
||||||
return ArgumentParseResult.failure(new StringParseException(sj.toString(), StringMode.GREEDY, commandContext));
|
return ArgumentParseResult.failure(new StringParseException(sj.toString(), StringMode.QUOTED, commandContext));
|
||||||
}
|
}
|
||||||
|
|
||||||
return ArgumentParseResult.success(sj.toString());
|
return ArgumentParseResult.success(sj.toString());
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue