Prevent Null entries in group inheritance from throwing errors.

This commit is contained in:
ElgarL 2012-04-03 14:30:27 +01:00
parent e2e51c9c95
commit 183602ac28
2 changed files with 8 additions and 5 deletions

View file

@ -159,4 +159,5 @@ v 1.9:
- Catch errors caused by bad indentation in yml's.
- Force remove player attachments on disconnect, and tidyup during player join in case of any errors. Fixes a bug of losing permissions.
- Added a new permission node 'groupmanager.op'. This will cause players with this node to be treated as op's when
using GroupManager commands (they will still require each commands permission node to use them).
using GroupManager commands (they will still require each commands permission node to use them).
- Prevent Null entries in group inheritance from throwing errors.

View file

@ -563,10 +563,12 @@ public class WorldDataHolder {
List<String> inheritedList = inheritance.get(groupKey);
Group thisGroup = ph.getGroup(groupKey);
for (String inheritedKey : inheritedList) {
Group inheritedGroup = ph.getGroup(inheritedKey);
if (thisGroup != null && inheritedGroup != null) {
thisGroup.addInherits(inheritedGroup);
}
if (inheritedKey != null) {
Group inheritedGroup = ph.getGroup(inheritedKey);
if (thisGroup != null && inheritedGroup != null) {
thisGroup.addInherits(inheritedGroup);
}
}
}
}