Modify the "you are banned" message? Stealth banning someone

Discussion in 'Bukkit Help' started by petrifiednightmares, Nov 2, 2011.

Thread Status:
Not open for further replies.
  1. Is there a way to modify the "you are banned from this server" message? Better yet, is there a way for the server to not display anything when a player is banned? It will simply not allow the user to log in, but provide no reason.
     
  2. Offline

    emericask8ur

    Well for a shortcut you can check if the player trying to join is banned than it will kick him with a custom message.
     
  3. So you mean bind listener to player join and kick them if their user name matches a list.
     
  4. Offline

    ks07

    You need to hook into the onPlayerPreLogin() method in your PlayerListener. From there, you can call event.disallow(PlayerPreLoginEvent.Result result, String message), and set the message string to whatever you'd like.

    See the JavaDocs here: http://jd.bukkit.org/apidocs/org/bukkit/event/player/PlayerPreLoginEvent.html

    Also, this should probably be in the development forums. :p
     
  5. Thanks! I'll do that.

    I originally posted it here because I was wondering if there's a mechanism that's built into bukkit that allows me to do this. However, seeing as the steps to do this in a plugin is pretty simple, I'll just code it up then. Thanks for both your helps!
     
  6. Offline

    3ric

    Would you release this plugin? I too would like banned players to just see "Connection Refused: Connect"

    :)
     
Thread Status:
Not open for further replies.

Share This Page