mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-24 05:03:34 -04:00
Fix LS with non-existent ranks
This commit is contained in:
parent
b2d4702919
commit
e28db73fdc
@ -46,6 +46,7 @@ namespace MCGalaxy.Games {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ProcessSettingsLine(string key, string value) {
|
void ProcessSettingsLine(string key, string value) {
|
||||||
|
LevelPermission perm;
|
||||||
switch (key.ToLower()) {
|
switch (key.ToLower()) {
|
||||||
case "start-on-startup": startOnStartup = bool.Parse(value); break;
|
case "start-on-startup": startOnStartup = bool.Parse(value); break;
|
||||||
case "send-afk-to-main": sendAfkMain = bool.Parse(value); break;
|
case "send-afk-to-main": sendAfkMain = bool.Parse(value); break;
|
||||||
@ -54,12 +55,12 @@ namespace MCGalaxy.Games {
|
|||||||
case "lives": lifeNum = int.Parse(value); break;
|
case "lives": lifeNum = int.Parse(value); break;
|
||||||
|
|
||||||
case "setup-rank":
|
case "setup-rank":
|
||||||
if (Group.Find(value) != null)
|
perm = Group.ParsePermOrName(value);
|
||||||
setupRank = Group.Find(value).Permission;
|
if (perm != LevelPermission.Null) setupRank = perm;
|
||||||
break;
|
break;
|
||||||
case "control-rank":
|
case "control-rank":
|
||||||
if (Group.Find(value) != null)
|
perm = Group.ParsePermOrName(value);
|
||||||
controlRank = Group.Find(value).Permission;
|
if (perm != LevelPermission.Null) controlRank = perm;
|
||||||
break;
|
break;
|
||||||
case "maps":
|
case "maps":
|
||||||
foreach (string name in value.Split(',')) {
|
foreach (string name in value.Split(',')) {
|
||||||
@ -79,8 +80,8 @@ namespace MCGalaxy.Games {
|
|||||||
w.WriteLine("vote-count = " + voteCount);
|
w.WriteLine("vote-count = " + voteCount);
|
||||||
w.WriteLine("vote-time = " + voteTime);
|
w.WriteLine("vote-time = " + voteTime);
|
||||||
w.WriteLine("lives = " + lifeNum);
|
w.WriteLine("lives = " + lifeNum);
|
||||||
w.WriteLine("setup-rank = " + Group.GetName(setupRank));
|
w.WriteLine("setup-rank = " + (int)setupRank);
|
||||||
w.WriteLine("control-rank = " + Group.GetName(controlRank));
|
w.WriteLine("control-rank = " + (int)controlRank);
|
||||||
w.WriteLine("maps = " + maps.Join());
|
w.WriteLine("maps = " + maps.Join());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user