Exemple #1
0
 public Group(LevelPermission Perm, int maxB, string fullName, char newColor, string file)
 {
     Permission = Perm;
     maxBlocks = maxB;
     trueName = fullName;
     name = trueName.ToLower();
     color = "&" + newColor;
     fileName = file;
     if (name != "nobody")
         playerList = PlayerList.Load(fileName, this);
     else
         playerList = new PlayerList();
 }
Exemple #2
0
 public static PlayerList Load(string path, Group groupName)
 {
     if (!Directory.Exists("ranks")) { Directory.CreateDirectory("ranks"); }
     path = "ranks/" + path;
     PlayerList list = new PlayerList();
     list.group = groupName;
     if (File.Exists(path))
     {
         foreach (string line in File.ReadAllLines(path)) { list.Add(line); }
     }
     else
     {
         File.Create(path).Close();
         Server.s.Log("CREATED NEW: " + path);
     } return list;
 }