if (getPlayer(conn.getId()) != null) { disconnected(getPlayer(conn.getId()));
Player player = getPlayer(conn.getId()); if (null != player) { disconnected( player );
    public void disconnected(Connection conn) {        // write something in the log        System.out.println("s: connection " + conn.getId() + " disconnected");                // kill the connection and remove it from any lists it might be on        conn.die();        connections.removeElement(conn);        connectionsPending.removeElement(conn);        connectionIds.remove(new Integer(conn.getId()));                // if there's a player for this connection, remove it too        if (getPlayer(conn.getId()) != null) {            disconnected(getPlayer(conn.getId()));        }    }