Fixed how optional commands work - we don't find an earlier command in the tree anymore.
This commit is contained in:
@@ -89,9 +89,7 @@ public class CommandDispatcher<S> {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (child.getCommand() != null) {
|
||||
context.withCommand(child.getCommand());
|
||||
}
|
||||
context.withCommand(child.getCommand());
|
||||
if (remaining.isEmpty()) {
|
||||
return new ParseResults<>(context);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user