mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-11-03 01:19:58 +01:00
Catch NullPointerErrors generated by blank permission nodes.
This commit is contained in:
parent
768c92e5bf
commit
d0e5685ac0
@ -100,3 +100,4 @@ v 1.8:
|
||||
- Changed over to a reflection method for populating superperms as Bukkit lags when you handle permissions one at a time.
|
||||
- Major, MAJOR changes to support partial/full world mirroring.
|
||||
You can now mirror groups.yml, users.yml or both files between different worlds.
|
||||
- Catch NullPointerErrors generated by blank permission nodes.
|
@ -470,7 +470,12 @@ public class WorldDataHolder {
|
||||
}
|
||||
if (thisGroupNode.get("permissions") instanceof List) {
|
||||
for (Object o : ((List) thisGroupNode.get("permissions"))) {
|
||||
try {
|
||||
thisGrp.addPermission(o.toString());
|
||||
} catch (NullPointerException e) {
|
||||
// Ignore this entry as it's null.
|
||||
//throw new IllegalArgumentException("Invalid permission node in group: " + thisGrp.getName() + " in file: " + groupsFile.getPath());
|
||||
}
|
||||
}
|
||||
} else if (thisGroupNode.get("permissions") instanceof String) {
|
||||
thisGrp.addPermission((String) thisGroupNode.get("permissions"));
|
||||
@ -582,7 +587,12 @@ public class WorldDataHolder {
|
||||
thisUser.addPermission(o.toString());
|
||||
}
|
||||
} else if (thisUserNode.get("permissions") instanceof String) {
|
||||
try {
|
||||
thisUser.addPermission(thisUserNode.get("permissions").toString());
|
||||
} catch (NullPointerException e) {
|
||||
// Ignore this entry as it's null.
|
||||
//throw new IllegalArgumentException("Invalid permission node for user: " + thisUser.getName() + " in file: " + UserFile.getPath());
|
||||
}
|
||||
}
|
||||
|
||||
//SUBGROUPS LOADING
|
||||
|
Loading…
Reference in New Issue
Block a user