[Slick2D] How to check when a AppGameContainer is closing?

I’m making an MMO and when the AppGameContainer closes I want the server to be notified that a client has quit and delete that client from the player list.

So, in slick2D, how do I check when an AppGameContainer is closing? (Sorta like isCloseRequested in LWJGL)

You could just have the client ping the server, if the ping is never received, have the server boot the player.

EDIT: This could also help you mimic the logout-delay stuff MMOs have to prevent people from logging out right before they die. Purposely make the check a countdown of about 20 seconds since the last input was recieved. If 10 seconds pass, and the client doesnt send a ping, log them out.

The underlying misconception is that the client should send critical state to the server. Instead, the server should determine what the client is up to. Never trust the client.

While you’re at it, drop one M off that MMO.

[quote]While you’re at it, drop one M off that MMO.
[/quote]
Haha, My friend said that to me today too!