mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-29 00:26:15 -04:00
Don't raise an error when 'additional perms' are specified for a command which has no 'additional perms'.
This commit is contained in:
parent
ef73cb3061
commit
a1178d5d56
@ -103,9 +103,12 @@ namespace MCGalaxy {
|
|||||||
while ((line = r.ReadLine()) != null) {
|
while ((line = r.ReadLine()) != null) {
|
||||||
try {
|
try {
|
||||||
if (!line.StartsWith("#") && line.Contains(':')) {
|
if (!line.StartsWith("#") && line.Contains(':')) {
|
||||||
string[] LINE = line.ToLower().Split(':');
|
string[] parts = line.ToLower().Split(':');
|
||||||
OtherPerms OTPE = Find(Command.all.Find(LINE[0]), int.Parse(LINE[1]));
|
Command cmd = Command.all.Find(parts[0]);
|
||||||
Edit(OTPE, int.Parse(LINE[2]));
|
|
||||||
|
OtherPerms perms = Find(cmd, int.Parse(parts[1]));
|
||||||
|
if (perms == null && cmd != null) continue; // command has no additional perms, so skip
|
||||||
|
Edit(perms, int.Parse(parts[2]));
|
||||||
}
|
}
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
Server.s.Log("Loading an additional command permission failed!!");
|
Server.s.Log("Loading an additional command permission failed!!");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user