1.15.2 Block bungeecord commands in the tab

Discussion in 'Spigot Plugin Development' started by Nosmoze, May 8, 2020.

  1. Hello,
    I recently made a plugin allowing to block all the commands in the / [tab] except some. For this I use the PlayerCommandSendEvent event, but this event does not block bungeecord commands. So I would like to know how I could block bungeecord commands. I tried to make a bungeecord plugin with the TabCompleteEvent event but the latter only block the arguments of the command and not the / [tab]. Is there a way to block bungeecord commands with the spigot API? How else can I do that with the bungeecord API?
  2. I will never understand why people feel the need to block commands via the tab complete event. If the plugin is well made, you can deny tab completion by not handing out or denying permission to the command. Works with all default bungee commands.

    To answer your question anyway, you can not deny tab completion of bungee commands on the spigot side, as far as I'm aware. You'd have to deal with that on the bungee side with one of the events, although I'm not sure why the TabComplete one wouldn't work, try the TabCompleteResponse one?
  3. i doubt that he does that for his own Plugin and rather to block tabcomplete for Plugins that are to quote you "not well made".

    Sadly there is a lot of them out here. He is probably trying to replace some of those himself by learning how to code own plugins. Keep in mind not everyone got time to programm all plugins themselves even if it was possible to do so. And most plugins on spigot seem to focus to be feature rich and shiny and for the "average" server owner who just wants to quickly put some plugins on.

    Back to topic:
    i've never had problems blocking tab with tabcomplete.
    @Nosmoze are you sure you are blocking / removing suggestions from tabcomplete properly? Can you share your attempt to block via BungeeCoord tabcompleteListener? Maybe you did something wrong there.
  4. To answer you, if I want it to be just for a server. The plugin I dev will never be distributed. I do with the constraints of the founder

    Here is my attempt: https://pastebin.com/sAcfMARQ
  5. I tried TabCompleteResponseEvent but I had exactly the same problem. I must use them badly