mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-28 07:56:20 -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) {
|
||||
try {
|
||||
if (!line.StartsWith("#") && line.Contains(':')) {
|
||||
string[] LINE = line.ToLower().Split(':');
|
||||
OtherPerms OTPE = Find(Command.all.Find(LINE[0]), int.Parse(LINE[1]));
|
||||
Edit(OTPE, int.Parse(LINE[2]));
|
||||
string[] parts = line.ToLower().Split(':');
|
||||
Command cmd = Command.all.Find(parts[0]);
|
||||
|
||||
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) {
|
||||
Server.s.Log("Loading an additional command permission failed!!");
|
||||
|
Loading…
x
Reference in New Issue
Block a user