Paper icon indicating copy to clipboard operation
Paper copied to clipboard

Allow bukkit commands in /execute command

Open Machine-Maker opened this issue 2 years ago • 10 comments

Oh what a beautiful command system bukkit has crammed on top of brigadier...

If there's a better way to fix this, let me know. Main issue is that when the /execute command, and its children are registered, the root node from the dispatcher it's using gets thrown away because a new instance of the dispatcher is created later on (in CraftServer#syncCommands). So the root node it's using is "outdated". This DelegatingRootCommandNode always calls for the latest one. Further changes were needed to make sure the player's are sent the correct redirect node for /execute instead of the "outdated" root node.

Machine-Maker avatar Aug 26 '21 23:08 Machine-Maker