Rewrite /glist

Discussion in 'Spigot Plugin Development' started by HydroTekZ, Jun 13, 2015.

  1. I need to rewrite the /glist command. I don't wanna create a new command since everyone is used to the command /glist. How can I do this? I basically want to hide the vanished players from that list, but I want to keep the same command.
     
  2. I think the PlayerCommandPreprocessEvent would be good for this. Intercept the /glist command, then route it into another command that you make yourself - You'll be able to do everything easily, and the players won't notice a thing!
     
  3. I believe he is talking about rewriting it on the Bungeecord end. If I'm remember correctly, Bungeecord catches commands before the server ever sees them, so that option is out of the question.
     
    • Agree Agree x 1
  4. I think I have to do it within a BungeeCord event, but I have no idea how. I can't find a command event for BungeeCord.
     
  5. You could do that, or get the source for the glist module and implement it the same way but with your hidden player checks. Although, reliably getting hidden players from the servers to bungeecord might prove to be tedious.
     
  6. Go into your modules folder and delete the glist module. Then, just create a bungee plugin for /glist