Add custom tab suggestions to vanilla commands

Discussion in 'Plugin Development' started by Reflxction, Jun 28, 2019.

Thread Status:
Not open for further replies.
  1. Offline

    Reflxction

    Hello. In the development of my plugin, I came to the need to add custom tab suggestions to vanilla commands (such as /gamemode). I've tried PlayerCommandSendEvent but it does not work for tabbing commands, and TabCompleteEvent only works for plugin commands, and not vanilla commands. One of the workarounds I thought of was modifying (if any) the tab list from the command NMS class using reflections, but seeing how command classes are built, I don't think it's possible (will still look more into that).

    Is there any dedicated event for tabbing vanilla commands? If not, then how could I achieve my goal? Thanks

    P.S: I'm aware of the possibility to create my own TabExecutor to override the vanilla command, however I may need to modify a lot of commands so I do not wish to make tons of TabExecutors. I'll use it as my plan B if everything fails.
     
Thread Status:
Not open for further replies.

Share This Page