mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2026-11-22 09:39:46 +00:00
Slightly refactor AbstractConfigurateStorage#appendNode
This commit is contained in:
1 file changed
+1
-2
+1
-2
@@ -639,13 +639,12 @@ public abstract class AbstractConfigurateStorage implements StorageImplementatio
|
||||
}
|
||||
|
||||
private void appendNode(ConfigurationNode base, String key, ConfigurationNode attributes, String keyFieldName) {
|
||||
ConfigurationNode appended = base.getAppendedNode();
|
||||
if (this.loader instanceof YamlLoader) {
|
||||
// create a map node with a single entry of key --> attributes
|
||||
ConfigurationNode appended = base.getAppendedNode();
|
||||
appended.getNode(key).setValue(attributes);
|
||||
} else {
|
||||
// include the attributes and key in the same map
|
||||
ConfigurationNode appended = base.getAppendedNode();
|
||||
appended.getNode(keyFieldName).setValue(key);
|
||||
appended.mergeValuesFrom(attributes);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user