Making a auth plugin!

Discussion in 'Spigot Plugin Development' started by xbpuk, Jun 6, 2018.

  1. How can I disable players from executing commands (BungeeCord/proxy commands) from a spigot/bukkit plugin? - Is it possible through PlayerCommandPreprocessEvent?
     
  2. I know it's possible for spigot commands (I have a little plugin doing exactly that). However I believe to prevent bungeecord commands you must do it from the bungeecord instance.

    Someone please correct me if I'm wrong, but I believe bungeecord commands work because technically the client is communicating with bungeecord before it communicates with spigot, thus bungeecord "intercepts" all bungee commands before your spigot plugin ever gets notified of their existence.
     
    • Informative Informative x 1
  3. Oh! That may be my issue here. Thanks for that :) - So. I believed they were sent from the Spigot server to the BungeeCord instance and then the BungeeCord server sent some instructions back.

    Either way; Thank you for the information, greatly appreciated. I await further responses from others. +1
     
  4. joehot200

    Supporter

    @CrypticCabub Is correct. If you wish to stop a command at the BungeeCord level, it will need to be intercepted by a BungeeeCord plugin.

    A BungeeCord plugin to go with your Spigot plugin should work. Make the BungeeCord plugin block all commands and messages (except your auth commands, obviously!) until it gets a message from Spigot telling it to allow commands from the player.
     
    • Informative Informative x 1
  5. You can use pluginmessaging, but still need a bungee-side part of the plugin.
     
    • Funny Funny x 1