Пример #1
0
        /// <summary>
        /// Removes a group inherit from the group
        /// </summary>
        /// <param name="group">The group inherit to remove</param>
        public void RemoveInherit(PointBlankGroup group)
        {
            if (!_Inherits.Contains(group))
            {
                return;
            }

            _Inherits.Remove(group);
            PointBlankGroupEvents.RunInheritRemoved(this, group);
        }
Пример #2
0
        /// <summary>
        /// Removes a suffix from the group
        /// </summary>
        /// <param name="suffix">The suffix to remove</param>
        public void RemoveSuffix(string suffix)
        {
            if (!_Suffixes.Contains(suffix))
            {
                return;
            }

            _Suffixes.Remove(suffix);
            PointBlankGroupEvents.RunSuffixRemoved(this, suffix);
        }
Пример #3
0
        /// <summary>
        /// Adds a suffix to the group
        /// </summary>
        /// <param name="suffix">The suffix to add</param>
        public void AddSuffix(string suffix)
        {
            if (_Suffixes.Contains(suffix))
            {
                return;
            }

            _Suffixes.Add(suffix);
            PointBlankGroupEvents.RunSuffixAdded(this, suffix);
        }
Пример #4
0
        /// <summary>
        /// Removes a prefix from the group
        /// </summary>
        /// <param name="prefix">The prefix to remove</param>
        public void RemovePrefix(string prefix)
        {
            if (!_Prefixes.Contains(prefix))
            {
                return;
            }

            _Prefixes.Remove(prefix);
            PointBlankGroupEvents.RunPrefixRemoved(this, prefix);
        }
Пример #5
0
        /// <summary>
        /// Adds a prefix to the group
        /// </summary>
        /// <param name="prefix">The prefix to add</param>
        public void AddPrefix(string prefix)
        {
            if (_Prefixes.Contains(prefix))
            {
                return;
            }

            _Prefixes.Add(prefix);
            PointBlankGroupEvents.RunPrefixAdded(this, prefix);
        }
Пример #6
0
        /// <summary>
        /// Removes a permission from the group
        /// </summary>
        /// <param name="permission">The permission to remove</param>
        public void RemovePermission(string permission)
        {
            if (!_Permissions.Contains(permission))
            {
                return;
            }

            _Permissions.Remove(permission);
            PointBlankGroupEvents.RunPermissionRemoved(this, permission);
        }
Пример #7
0
        /// <summary>
        /// Add a permission to the group
        /// </summary>
        /// <param name="permission">The permission to add</param>
        public void AddPermission(string permission)
        {
            if (_Permissions.Contains(permission))
            {
                return;
            }

            _Permissions.Add(permission);
            PointBlankGroupEvents.RunPermissionAdded(this, permission);
        }
        /// <summary>
        /// Removes a group from the server
        /// </summary>
        /// <param name="group">The group to remove</param>
        public static void RemoveGroup(PointBlankGroup group)
        {
            if (!_Groups.ContainsValue(group))
            {
                return;
            }
            _Groups.Remove(group.ID);

            if (Loaded)
            {
                PointBlankGroupEvents.RunGroupRemoved(group);
            }
        }
        /// <summary>
        /// Adds a group to the server groups
        /// </summary>
        /// <param name="group">The group instance to add</param>
        public static void AddGroup(PointBlankGroup group)
        {
            if (_Groups.ContainsKey(group.ID))
            {
                return;
            }
            _Groups.Add(group.ID, group);

            if (Loaded)
            {
                PointBlankGroupEvents.RunGroupAdded(group);
            }
        }
Пример #10
0
        /// <summary>
        /// Adds a group inherit to the group
        /// </summary>
        /// <param name="group">The group to inherit from</param>
        public void AddInherit(PointBlankGroup group)
        {
            if (_Inherits.Contains(group))
            {
                return;
            }
            if (_Inherits.Count(a => a.ID == group.ID) > 0)
            {
                return;
            }

            _Inherits.Add(group);
            PointBlankGroupEvents.RunInheritAdded(this, group);
        }
        /// <summary>
        /// Removes a group from the server
        /// </summary>
        /// <param name="ID">The ID of the group</param>
        public static void RemoveGroup(string ID)
        {
            if (!_Groups.ContainsKey(ID))
            {
                return;
            }
            PointBlankGroup group = _Groups[ID];

            _Groups.Remove(ID);

            if (Loaded)
            {
                PointBlankGroupEvents.RunGroupRemoved(group);
            }
        }
        /// <summary>
        /// Creates and adds a group to the server group
        /// </summary>
        /// <param name="ID">The group ID</param>
        /// <param name="Name">The group name</param>
        /// <param name="Cooldown">The command cooldown for the group</param>
        public static void AddGroup(string ID, string Name, bool isDefault, int Cooldown, Color color)
        {
            if (_Groups.ContainsKey(ID))
            {
                return;
            }
            PointBlankGroup group = new PointBlankGroup(ID, Name, isDefault, Cooldown, color);

            _Groups.Add(ID, group);

            if (Loaded)
            {
                PointBlankGroupEvents.RunGroupAdded(group);
            }
        }