-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Command literal aliases do not work with Brigadier #5
Comments
Just for clarity, the issue here is with inner node aliases. Root node aliases work fine. Working example (root node aliases): Example with issue (inner node aliases): |
I noticed this too and thought it was intentional. Personally I would do it like so:
Say my command is registered 'test' and alias is 'thetest', then /t will only suggest 'test' and typing /th will only suggest 'thetest'. Was not aware this was only an issue with brigadier though. |
Brigadier would then show the entire command chain as invalid, as it's not aware of the alias literals. The literal suggestions are handled by the client. This would require the use of a custom argument. |
Aliases of literal arguments do not show up in the command suggestions for Brigadier. The commands do, however, still work if you use the aliases. I had a little chat on the Discord server with a couple of the devs and found that this is intentional due to polluting the Brigadier command node map. I would recommend either documenting that this is intentional somewhere (the wiki perhaps?), or maybe add an option to enable this functionality explicitly since it has downsides.
Example code: https://pastebin.com/71hT3fSW
Gif of executing the command with suggestions: https://gyazo.com/c78e08a403f6e95194e1574167e70990
The text was updated successfully, but these errors were encountered: