public void playerStateChanged(PlayerStateEvent pse) { switch (pse.getStateChanged()) { case PlayerStateEvent.STATE_DEAD: case PlayerStateEvent.STATE_SUSPENDEDSTART: case PlayerStateEvent.STATE_INVALID: fireWidgetEvent(WidgetBody.TERMINATED); break; } }
/** * Called when a player dies or disconnects. * @param wasDisconnected true on disconnects, false on normal deaths. */ public void playerStateChanged(PlayerStateEvent pse) { if (pse.getStateChanged() == PlayerStateEvent.STATE_INVALID) removePlayer((Player)pse.getPlayer()); }