Differentiating between different methods of disconnecting

Discussion in 'Plugin Development' started by Father Of Time, Apr 9, 2012.

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

    Father Of Time

    Good evening all,

    This is a pretty short question, is it possible to differentiate between the different methods of disconnecting? By this I mean can I differentiate between the following:
    • Closing client
    • Clicking disconnect
    • Lost connection
    I am not so much worried about identifying all of the different methods as much as I am differentiating between when a player actually clicks disconnect vs any other form of disconnecting.

    If anyone knows how to identify this specific disconnection I would be interested to hear it.

    Thank you in advance for your time, have a wonderful evening.
  2. Offline


    I don' think it is possible to determine which of these three 'methods' were used by the client. They just lose the connection to the client in all cases, but I might be wrong here.
  3. Offline

    Father Of Time

    Yea, I was affraid of that... I have a nice little way of punishing battle loggers, but it has a nasty little side effect of punishing people who have bad connections and log out due to a dropped connection.

    Personally I feel that a player losing connection should be punished just the same, but the players seem to want some slack so I need to find a way around this...

    Oh well, I'll keep thinking. Thanks for the response!
  4. Offline

    ZeusAllMighty11 Retired Staff

    Well not that this helps, but what about the people who disconnect their ethernet? lolol
  5. Offline

    Father Of Time

    I just pity the person who goes to this length to save a single minecraft inventory... :eek:
    ZeusAllMighty11 likes this.
  6. Offline


    Well, if I look at http://mc.kev009.com/Protocol#Disconnect.2FKick_.280xFF.29 there might be a solution. You could check for that packet. If it get's received you have a normal disconnect, but I don't know if it also gets send when you close the window...

    Tried it and yes, it only gets send when the client clicks disconnect not when he just closes the window.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 25, 2016
Thread Status:
Not open for further replies.

Share This Page