Exemple #1
0
 public void playerStateChanged(PlayerStateEvent pse) {
   switch (pse.getStateChanged()) {
     case PlayerStateEvent.STATE_DEAD:
     case PlayerStateEvent.STATE_SUSPENDEDSTART:
     case PlayerStateEvent.STATE_INVALID:
       fireWidgetEvent(WidgetBody.TERMINATED);
       break;
   }
 }
Exemple #2
0
	/**
	 * 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());
	}