Removed useless permissions class and finished loading groups
This commit is contained in:
parent
f5723ee834
commit
3774c30f7d
3 changed files with 30 additions and 3 deletions
|
|
@ -338,11 +338,10 @@ namespace TShockAPI
|
|||
string[] args = lines[i].Split(' ');
|
||||
string name = args[0];
|
||||
string parent = args[1];
|
||||
Group group;
|
||||
Group group = null;
|
||||
if (parent.Equals("null"))
|
||||
{
|
||||
group = new Group(name);
|
||||
groups.Add(group);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -355,6 +354,25 @@ namespace TShockAPI
|
|||
}
|
||||
}
|
||||
}
|
||||
if (group == null)
|
||||
{
|
||||
throw new System.Exception("Something in the groups.txt is fucked up");
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int j = 2; j < args.Length; j++)
|
||||
{
|
||||
string permission = args[j];
|
||||
if (permission.StartsWith("!"))
|
||||
{
|
||||
group.NegatePermission(args[j].Replace("!", ""));
|
||||
}
|
||||
else
|
||||
{
|
||||
group.AddPermission(args[j]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue