summaryrefslogtreecommitdiffstats
path: root/EssentialsGroupManager/src
diff options
context:
space:
mode:
authorElgarL <ElgarL@palmergames.com>2012-04-03 14:30:27 +0100
committerElgarL <ElgarL@palmergames.com>2012-04-03 14:30:27 +0100
commitebfab2c9fe31bd5a5b92ac1bf5575e760738d23e (patch)
treecb62fa7f2172d3bac8f139d4f291eba29b14add6 /EssentialsGroupManager/src
parent5ad8f0ee8eb4e6b5c753de2ee4bba4f82511e57c (diff)
downloadEssentials-ebfab2c9fe31bd5a5b92ac1bf5575e760738d23e.tar
Essentials-ebfab2c9fe31bd5a5b92ac1bf5575e760738d23e.tar.gz
Essentials-ebfab2c9fe31bd5a5b92ac1bf5575e760738d23e.tar.lz
Essentials-ebfab2c9fe31bd5a5b92ac1bf5575e760738d23e.tar.xz
Essentials-ebfab2c9fe31bd5a5b92ac1bf5575e760738d23e.zip
Prevent Null entries in group inheritance from throwing errors.
Diffstat (limited to 'EssentialsGroupManager/src')
-rw-r--r--EssentialsGroupManager/src/Changelog.txt3
-rw-r--r--EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/WorldDataHolder.java10
2 files changed, 8 insertions, 5 deletions
diff --git a/EssentialsGroupManager/src/Changelog.txt b/EssentialsGroupManager/src/Changelog.txt
index fd9d8ef35..eba17517c 100644
--- a/EssentialsGroupManager/src/Changelog.txt
+++ b/EssentialsGroupManager/src/Changelog.txt
@@ -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). \ No newline at end of file
+ using GroupManager commands (they will still require each commands permission node to use them).
+ - Prevent Null entries in group inheritance from throwing errors. \ No newline at end of file
diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/WorldDataHolder.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/WorldDataHolder.java
index d7f146438..cee2ec0b8 100644
--- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/WorldDataHolder.java
+++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/WorldDataHolder.java
@@ -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);
+ }
+ }
}
}