[Solved] Retrieving disconnect message

Discussion in 'Plugin Development' started by Trc202, Jun 10, 2011.

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

    Trc202

    I'm trying to retrieve the quit message from PlayerQuitEvent. The particular quit messages I am looking for are "disconnect.quitting" and "disconnect.endOfStream". I have tried using "getQuitMessage" from the PlayerQuitEvent however it does not contain the desired strings. Any assistance would be appreciated.
     
  2. Offline

    Trc202

    Ok did a little more research on the subject and it seems the string I am looking for is located in the netserverhandler on line 376. Does anyone know how to listen to the inbound packets? Example code would be appreciated.
     
  3. Offline

    Shamebot

    Maybe you can listen to the Logger?
     
  4. Offline

    iffa

    Why don't you ask @Tahkeh ?
     
  5. Offline

    Trc202

    Thanks, that is exactly what I needed. I'll post the code here when i'm done.

    Small snippet for future reference. http://pastebin.com/skda3hJK

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 16, 2016
  6. Offline

    Tahkeh

    Wait what did I do?

    If I'm correct, I think he's talking about what's printed in the console...
     
  7. Offline

    Trc202

    Correct. I managed to get it working though. The snippit above is for future refrence. (In case someone else runs into this problem)
     
Thread Status:
Not open for further replies.

Share This Page