When PlayerQuitEvent is called

Discussion in 'Spigot Plugin Development' started by BadBoy23, Feb 13, 2019.

  1. Hello all,
    I have a question when PlayerQuitEvent is called. I understand that it is called at the exit of the player from the server. But let's say the player left the server because of the loss of the Internet or the occurrence of another error, is then called PlayerQuitEvent?
  2. Yes.
    • Agree Agree x 1
  3. PQE is not called when the server crashes (for obvious reasons) and whenever (not entirely sure about this, could be entirely wrong) the player gets kicked. (Could be wrong, but there's PlayerKickEvent so I'm not too confident on that)
  4. I'm 99% sure PlayerQuitEvent gets called even when the player gets kicked.

    Looks like yes.
    • Agree Agree x 1
  5. It is always called when the Player disconnects from the server, even if he gets banned or kicked.
    Just when the server crashes the Event isn't called!
  6. I think so, but as someone wrote if you kick player from the server, then PlayerKickEvent will be executed.
  7. Yeah but then both Events will be called!
  8. PlayerQuitEvent can be seen as Player"Disconnect"Event, internet loss, ALT+F4, powercuts and everything to do with the sudden disconnection from the server are seen as the "PlayerQutiEvent". When a player is kicked, both the PlayerQuitEvent and the PlayerKickEvent are called, this is because they are still leaving the server, just due to a reason which isn't sometimes controlled by that player.

Share This Page