🐛 Fix optionals not being brig executors
This commit is contained in:
parent
c9d4f39612
commit
c74ac64e5f
2 changed files with 6 additions and 0 deletions
|
|
@ -427,6 +427,9 @@ public final class CloudBrigadierManager<C, S> {
|
|||
if (forceExecutor || root.isLeaf() || !root.getValue().isRequired()) {
|
||||
argumentBuilder.executes(executor);
|
||||
}
|
||||
if (root.getChildren().stream().noneMatch(node -> node.getValue().isRequired())) {
|
||||
argumentBuilder.executes(executor);
|
||||
}
|
||||
for (final CommandTree.Node<CommandArgument<C, ?>> node : root.getChildren()) {
|
||||
argumentBuilder.then(constructCommandNode(forceExecutor, node, permissionChecker, executor, suggestionProvider));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue