mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2024-09-12 05:08:48 +00:00
Prevent Null entries in group inheritance from throwing errors.
This commit is contained in:
parent
e2e51c9c95
commit
183602ac28
|
@ -160,3 +160,4 @@ v 1.9:
|
||||||
- Force remove player attachments on disconnect, and tidyup during player join in case of any errors. Fixes a bug of losing permissions.
|
- 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
|
- 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.
|
|
@ -563,12 +563,14 @@ public class WorldDataHolder {
|
||||||
List<String> inheritedList = inheritance.get(groupKey);
|
List<String> inheritedList = inheritance.get(groupKey);
|
||||||
Group thisGroup = ph.getGroup(groupKey);
|
Group thisGroup = ph.getGroup(groupKey);
|
||||||
for (String inheritedKey : inheritedList) {
|
for (String inheritedKey : inheritedList) {
|
||||||
|
if (inheritedKey != null) {
|
||||||
Group inheritedGroup = ph.getGroup(inheritedKey);
|
Group inheritedGroup = ph.getGroup(inheritedKey);
|
||||||
if (thisGroup != null && inheritedGroup != null) {
|
if (thisGroup != null && inheritedGroup != null) {
|
||||||
thisGroup.addInherits(inheritedGroup);
|
thisGroup.addInherits(inheritedGroup);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ph.removeGroupsChangedFlag();
|
ph.removeGroupsChangedFlag();
|
||||||
// Update the LastModified time.
|
// Update the LastModified time.
|
||||||
|
|
Loading…
Reference in a new issue