Disabling Join and Leave messages

Discussion in 'Plugin Development' started by LewisNewson, Jan 4, 2014.

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

    LewisNewson

    Hello, I was wondering whether there was a way to disable the Join and Leave messages that Minecraft puts out whenever people join/leave through code?

    Thanks, Lewis
     
  2. Offline

    ImDeJay

    Code:
        @EventHandler
        public void inventoryClick(PlayerJoinEvent event){
       event.setJoinMessage(null);
        }
    Code:
        @EventHandler
        public void inventoryClick(PlayerQuitEvent event){
       event.setQuitMessage(null);
        }
     
    AGuyWhoSkis likes this.
  3. Offline

    Captain Dory

    ImDeJay
    Could replacing null with something else be used to make custom join messages?
     
  4. Offline

    iFamasssxD

    Precisely that.
     
  5. Offline

    PolarCraft

    LewisNewson Do this.
    Code:java
    1. @EventHandler
    2. public void joinEvent(PlayerJoinEvent e){
    3. e.setJoinMessage("");
    4. }
    5.  
    6. @EventHandler
    7. public void quitEvent(PlayerQuitEvent e){
    8. e.setQuitMessage("");
    9. }
     
  6. Offline

    Bart

    It should be set to null - setting it to an empty string will cause an empty message to pop up.
     
  7. Offline

    PolarCraft

    Bart It works for me.:p
     
  8. Offline

    LewisNewson

    Bart
    Thanks alot man, I appreciate it!
     
    Bart likes this.
Thread Status:
Not open for further replies.

Share This Page