Don't remove from queue on failure in quoted string parser
This commit is contained in:
parent
484c97ca98
commit
18fc685c70
1 changed files with 3 additions and 1 deletions
|
|
@ -360,11 +360,13 @@ public final class StringArgument<C> extends CommandArgument<C, String> {
|
|||
inputQueue.remove();
|
||||
}
|
||||
} else {
|
||||
inner = inputQueue.remove();
|
||||
inner = inputQueue.peek();
|
||||
if (inner.startsWith("\"") || inner.startsWith("'")) {
|
||||
return ArgumentParseResult.failure(new StringParseException(sj.toString(),
|
||||
StringMode.QUOTED, commandContext
|
||||
));
|
||||
} else {
|
||||
inputQueue.remove();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue