mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2024-12-29 12:37:40 +01:00
Slightly refactor AbstractConfigurateStorage#appendNode
This commit is contained in:
parent
0964762217
commit
c40ad63291
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user