Example #1
0
        // Virtual
        /// <summary>
        /// Add the player to a group
        /// </summary>
        /// <param name="group">The group to add the player to</param>
        public virtual void AddGroup(PointBlankGroup group)
        {
            if (Groups.Contains(group))
            {
                return;
            }

            _Groups.Add(group);
            if (Loaded)
            {
                PointBlankPlayerEvents.RunGroupAdd(this, group);
            }
        }
Example #2
0
        /// <summary>
        /// Adds a permission to the player
        /// </summary>
        /// <param name="permission">The permission to add</param>
        public virtual void AddPermission(string permission)
        {
            if (Permissions.Contains(permission))
            {
                return;
            }

            _Permissions.Add(permission);
            if (Loaded)
            {
                PointBlankPlayerEvents.RunPermissionAdd(this, permission);
            }
        }
Example #3
0
        /// <summary>
        /// Removes a permission from the player
        /// </summary>
        /// <param name="permission">The permission to remove</param>
        public virtual void RemovePermission(string permission)
        {
            if (!Permissions.Contains(permission))
            {
                return;
            }

            _Permissions.Remove(permission);
            if (Loaded)
            {
                PointBlankPlayerEvents.RunPermissionRemove(this, permission);
            }
        }
Example #4
0
        /// <summary>
        /// Remove the player from a group
        /// </summary>
        /// <param name="group">The group to remove the player from</param>
        public virtual void RemoveGroup(PointBlankGroup group)
        {
            if (!Groups.Contains(group))
            {
                return;
            }

            _Groups.Remove(group);
            if (Loaded)
            {
                PointBlankPlayerEvents.RunGroupRemove(this, group);
            }
        }