mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-09 16:17:37 +02:00
Give a better error when a subgroup is null.
This commit is contained in:
@@ -194,4 +194,5 @@ v 2.0:
|
|||||||
- Stop using the YamlConfiguration in bukkit for our config handling. We can now support periods in world names.
|
- Stop using the YamlConfiguration in bukkit for our config handling. We can now support periods in world names.
|
||||||
- Fix GlobalGroups not loading permission nodes.
|
- Fix GlobalGroups not loading permission nodes.
|
||||||
- Fix an error with Logging set to 'OFF' triggering a cast exception.
|
- Fix an error with Logging set to 'OFF' triggering a cast exception.
|
||||||
- No more null errors from corrupt config.yml's.
|
- No more null errors from corrupt config.yml's.
|
||||||
|
- Give a better error when a subgroup is null.
|
@@ -861,11 +861,15 @@ public class WorldDataHolder {
|
|||||||
*/
|
*/
|
||||||
} else if (nodeData instanceof List) {
|
} else if (nodeData instanceof List) {
|
||||||
for (Object o : ((List) nodeData)) {
|
for (Object o : ((List) nodeData)) {
|
||||||
Group subGrp = ph.getGroup(o.toString());
|
if (o == null) {
|
||||||
if (subGrp != null) {
|
GroupManager.logger.warning("Invalid Subgroup data for user: " + thisUser.getName() + ". Ignoring entry in file: " + usersFile.getPath());
|
||||||
thisUser.addSubGroup(subGrp);
|
|
||||||
} else {
|
} else {
|
||||||
GroupManager.logger.warning("Subgroup '" + o.toString() + "' not found for user: " + thisUser.getName() + ". Ignoring entry in file: " + usersFile.getPath());
|
Group subGrp = ph.getGroup(o.toString());
|
||||||
|
if (subGrp != null) {
|
||||||
|
thisUser.addSubGroup(subGrp);
|
||||||
|
} else {
|
||||||
|
GroupManager.logger.warning("Subgroup '" + o.toString() + "' not found for user: " + thisUser.getName() + ". Ignoring entry in file: " + usersFile.getPath());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (nodeData instanceof String) {
|
} else if (nodeData instanceof String) {
|
||||||
|
Reference in New Issue
Block a user