mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2025-02-25 17:01:26 +01:00
parent
4e2807cff5
commit
d1cb644712
@ -439,11 +439,12 @@ public abstract class AbstractConfigurateStorage implements StorageImplementatio
|
|||||||
}
|
}
|
||||||
|
|
||||||
// assume 'configNode' is the actual entry.
|
// assume 'configNode' is the actual entry.
|
||||||
String permission = children.get(keyFieldName).getString(null);
|
ConfigurationNode appended = children.get(keyFieldName);
|
||||||
if (permission == null || permission.isEmpty()) {
|
if (appended == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String permission = appended.getString("");
|
||||||
return new NodeEntry(permission, configNode);
|
return new NodeEntry(permission, configNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -458,7 +459,7 @@ public abstract class AbstractConfigurateStorage implements StorageImplementatio
|
|||||||
}
|
}
|
||||||
|
|
||||||
NodeEntry entry = parseNode(appended, "permission");
|
NodeEntry entry = parseNode(appended, "permission");
|
||||||
if (entry == null) {
|
if (entry == null || entry.key.isEmpty()) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -476,7 +477,7 @@ public abstract class AbstractConfigurateStorage implements StorageImplementatio
|
|||||||
}
|
}
|
||||||
|
|
||||||
NodeEntry entry = parseNode(appended, "group");
|
NodeEntry entry = parseNode(appended, "group");
|
||||||
if (entry == null) {
|
if (entry == null || entry.key.isEmpty()) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -512,7 +513,7 @@ public abstract class AbstractConfigurateStorage implements StorageImplementatio
|
|||||||
|
|
||||||
for (ConfigurationNode appended : data.getNode("meta").getChildrenList()) {
|
for (ConfigurationNode appended : data.getNode("meta").getChildrenList()) {
|
||||||
NodeEntry entry = parseNode(appended, "key");
|
NodeEntry entry = parseNode(appended, "key");
|
||||||
if (entry == null) {
|
if (entry == null || entry.key.isEmpty()) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -545,7 +546,7 @@ public abstract class AbstractConfigurateStorage implements StorageImplementatio
|
|||||||
|
|
||||||
private void appendNode(ConfigurationNode base, String key, ConfigurationNode attributes, String keyFieldName) {
|
private void appendNode(ConfigurationNode base, String key, ConfigurationNode attributes, String keyFieldName) {
|
||||||
ConfigurationNode appended = base.appendListNode();
|
ConfigurationNode appended = base.appendListNode();
|
||||||
if (this.loader instanceof YamlLoader) {
|
if (this.loader instanceof YamlLoader && !key.isEmpty()) {
|
||||||
// create a map node with a single entry of key --> attributes
|
// create a map node with a single entry of key --> attributes
|
||||||
appended.getNode(key).setValue(attributes);
|
appended.getNode(key).setValue(attributes);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user