Treat any trailing space as "a yet to be finished command" instead of a maybe valid argument
This commit is contained in:
@@ -152,10 +152,8 @@ public class CommandDispatcher<S> {
|
||||
}
|
||||
|
||||
context.withCommand(child.getCommand());
|
||||
if (reader.canRead()) {
|
||||
if (reader.canRead(2)) {
|
||||
reader.skip();
|
||||
}
|
||||
if (reader.canRead(2)) {
|
||||
reader.skip();
|
||||
if (child.getRedirect() != null) {
|
||||
final CommandContextBuilder<S> childContext = new CommandContextBuilder<>(this, source, reader.getCursor());
|
||||
childContext.withNode(child.getRedirect(), new StringRange(reader.getCursor(), reader.getCursor()));
|
||||
|
||||
Reference in New Issue
Block a user