use of net.glowstone.net.message.play.game.PingMessage in project Glowstone by GlowstoneMC.
the class GlowSession method idle.
/**
* Notify that the session is currently idle.
*/
public void idle() {
if (pingMessageId == 0 && getProtocol() instanceof PlayProtocol) {
pingMessageId = random.nextInt();
if (pingMessageId == 0) {
pingMessageId++;
}
send(new PingMessage(pingMessageId));
} else {
disconnect("Timed out");
}
}
Aggregations