internal void UpdateRank(byte userType) { _userType = userType; if (userType >= 99 && DisallowedBlocks.Contains(7)) { DisallowedBlocks.Remove(7); } if (userType < 99 && !DisallowedBlocks.Contains(7)) // -- If the user is NOT an 'op', they cannot place bedrock. (block ID 7) { DisallowedBlocks.Add(7); } RankUpdated?.Invoke(userType); // -- Run the 'Rank Updated' event. }
protected virtual void OnRankUpdated(string name, string rank) { RankUpdated?.Invoke(this, new RankUpdateEventArgs { Name = name, Rank = rank }); }