mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-08 08:02:13 -07:00
#703: Fix/test yaml anchors and merge
By: Wolf2323 <gabrielpatrikurban@gmail.com>
This commit is contained in:
@@ -141,6 +141,7 @@ public class YamlConfiguration extends FileConfiguration {
|
||||
}
|
||||
|
||||
private void fromNodeTree(@NotNull MappingNode input, @NotNull ConfigurationSection section) {
|
||||
constructor.flattenMapping(input);
|
||||
for (NodeTuple nodeTuple : input.getValue()) {
|
||||
ScalarNode key = (ScalarNode) nodeTuple.getKeyNode();
|
||||
String keyString = key.getValue();
|
||||
|
@@ -7,6 +7,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.yaml.snakeyaml.constructor.SafeConstructor;
|
||||
import org.yaml.snakeyaml.error.YAMLException;
|
||||
import org.yaml.snakeyaml.nodes.MappingNode;
|
||||
import org.yaml.snakeyaml.nodes.Node;
|
||||
import org.yaml.snakeyaml.nodes.Tag;
|
||||
|
||||
@@ -16,6 +17,11 @@ public class YamlConstructor extends SafeConstructor {
|
||||
this.yamlConstructors.put(Tag.MAP, new ConstructCustomObject());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void flattenMapping(@NotNull final MappingNode node) {
|
||||
super.flattenMapping(node);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public Object construct(@NotNull Node node) {
|
||||
return constructObject(node);
|
||||
|
Reference in New Issue
Block a user