public static Player PlayerLogout(Player player) { Player logged = null; Monitor.Enter(useLock); if (GetInstance().Contains(player)) { logged = GetInstance().Find(p => p.Nickname == player.Nickname); logged.LogOut(); } Monitor.Exit(useLock); return(logged); }