public bool Lock([NotNull] Player player) { if (player == null) { throw new ArgumentNullException("player"); } lock ( lockLock ) { if (IsLocked) { return(false); } else { LockedBy = player.Name; LockedDate = DateTime.UtcNow; IsLocked = true; Map mapCache = Map; if (mapCache != null) { mapCache.ClearUpdateQueue(); mapCache.StopAllDrawOps(); } Players.Message("&WWorld was locked by {0}", player.ClassyName); Logger.Log(LogType.UserActivity, "World {0} was locked by {1}", Name, player.Name); return(true); } } }