public void EndSession(NetConnection client) { // Ends the session. IPlayerSession session = GetSessionByConnection(client); if (session == null) { return; //There is no session! } LogManager.Log(session.name + " disconnected.", LogLevel.Information); //Detach the entity and (dont)delete it. session.OnDisconnect(); }