Fixed how optional commands work - we don't find an earlier command in the tree anymore.

This commit is contained in:
Nathan Adams
2017-06-30 09:17:07 +02:00
parent 9a3f987c97
commit 4af7274892
2 changed files with 3 additions and 5 deletions
@@ -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 {