コード例 #1
0
ファイル: CustomRole.cs プロジェクト: babyboucher/EXILED
        /// <summary>
        /// Removes the role from a specific player.
        /// </summary>
        /// <param name="player">The <see cref="Player"/> to remove the role from.</param>
        public virtual void RemoveRole(Player player)
        {
            TrackedPlayers.Remove(player);
            if (RemovalKillsPlayer)
            {
                player.Role = RoleType.Spectator;
            }
            foreach (CustomAbility ability in CustomAbilities)
            {
                ability.RemoveAbility(player);
            }

            RoleRemoved(player);
        }
コード例 #2
0
 private void OnPlayerDisconnected(BasePlayer player, string reason) => TrackedPlayers.Remove(player.userID);