Skip to content
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

Adding Tab Completions #12

Open
Onyxtite opened this issue Sep 30, 2019 · 1 comment
Open

Adding Tab Completions #12

Onyxtite opened this issue Sep 30, 2019 · 1 comment

Comments

@Onyxtite
Copy link

Hello! Thanks for sharing this plugin! So far its great for filtering tab completions, but I was wondering if there was any chance that you could make a way to add tab completition for commands from any plugin aswell? This would be really nice.

Thanks for considering it.
Have a nice day.

@crashdemons
Copy link
Member

I've had a few requests for this which were denied, as to why I didn't reply but I'll try to explain now for future users.

Current the plugin filters commands sent with PlayerCommandSendEvent which contains a modifiable list of commands.
Thisn seems good because you would think you could just add commands right?
image
apparently not - the API doesn't permit it on bukkit's side.

Adding tab completions other ways means either registering the commands for this plugin without any idea what plugin they came from - or going back to ProtocolLib to modify packets (and the many problems relating to modifying the COMMANDs packet).

However, if you have a plugin that is adding a command, they should be registering it properly with bukkit, not using preprocessevent, this is even mentioned on the spigot forums often. If the plugin registers the command, and you've whitelisted it in AZTab, there should be a tab-complete suggestion for the command itself (arguments are up to the plugin to fill).

So: no because API, no because we would have the do some really hacky stuff to get it to work, no because the plugin should be doing it in the first place.

Thank you for listening to this rant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants