Example #1
0
        public static void Register(Group grp)
        {
            GroupList.Add(grp);
            grp.LoadPlayers();

            if (reloading)
            {
                grp.SetUsableBlocks();
                grp.SetUsableCommands();
            }
            OnGroupLoadedEvent.Call(grp);
        }
Example #2
0
 /// <summary>
 /// Create a new group object
 /// </summary>
 /// <param name="Perm">The permission of the group</param>
 /// <param name="maxB">The maxblocks this group can cuboid</param>
 /// <param name="maxUn">The max undo this group can do</param>
 /// <param name="fullName">The group full name</param>
 /// <param name="newColor">The color of the group (Not including the &)</param>
 /// <param name="motd">the custom MOTD for the group</param>
 /// <param name="file">The file path where the current players of this group are stored</param>
 public Group(LevelPermission Perm, int maxB, long maxUn, string fullName, char newColor, string motd, string file, byte maps = 3, string prefix = "")
 {
     Permission   = Perm;
     maxBlocks    = maxB;
     maxUndo      = maxUn;
     trueName     = fullName;
     name         = trueName.ToLower();
     color        = "&" + newColor;
     MOTD         = motd;
     fileName     = file;
     OverseerMaps = maps;
     this.prefix  = prefix;
     playerList   = name != "nobody" ? PlayerList.Load(fileName, this) : new PlayerList();
     if (OnGroupLoaded != null)
     {
         OnGroupLoaded(this);
     }
     OnGroupLoadedEvent.Call(this);
 }