🐛 Fix command registration for Velocity
We need to recreate the Brigadier command node each time a command is extended, and the code was only letting each command get registered once.
This commit is contained in:
parent
0d44a8c944
commit
7036beb8ad
4 changed files with 12 additions and 16 deletions
|
|
@ -282,7 +282,7 @@ public final class CloudBrigadierManager<C, S> {
|
|||
final LiteralArgumentBuilder<S> literalArgumentBuilder = LiteralArgumentBuilder.<S>literal(root.getLiteral())
|
||||
.requires(sender -> permissionChecker.test(sender, (CommandPermission) cloudCommand.getNodeMeta()
|
||||
.getOrDefault("permission", Permission.empty())));
|
||||
if (cloudCommand.isLeaf() && cloudCommand.getValue() != null) {
|
||||
if (cloudCommand.getValue() != null && cloudCommand.getValue().getOwningCommand() != null) {
|
||||
literalArgumentBuilder.executes(executor);
|
||||
}
|
||||
final LiteralCommandNode<S> constructedRoot = literalArgumentBuilder.build();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue