YamlStaticConfig bug , paper 1.18.1 , Foundation 5.12.6
aaa8881 opened this issue · comments
signition commented
paper 1.8.1 , java17 , foundation 5.12.6
yml
d1key1:
d2key1:
moo: 'aaa'
boo: 'bbb'
d1key2:
d2key2:
moo: 'aaa'
boo: 'bbb'
TestConfig extends YamlStaticConfig
private static void init() {
getMap("").keySet().forEach(key1->{
SerializedMap map1 = getMap(key1);
map1.keySet().forEach( key2 -> {
SerializedMap map2 = map1.getMap(key2);
map2.keySet().forEach( key3 -> {
Common.log( key3 + " : " + map2.getString(key3));
});
});
});
}
result
[03:32:21 INFO]: [null] moo : org.bukkit.configuration.SectionPathData@173ca392
[03:32:21 INFO]: [null] boo : org.bukkit.configuration.SectionPathData@440dd8b8
[03:32:21 INFO]: [null] moo : org.bukkit.configuration.SectionPathData@1470475d
[03:32:21 INFO]: [null] boo : org.bukkit.configuration.SectionPathData@66a25672
expected result
moo: aaa
boo: bbb
moo: aaa
boo: bbb
depth 1 yml works
example
key1:
a: 'aaa'
b: 'bbb'
key2:
a: 'aaa'
b: 'bbb'
more than depth 2 doesn't work.
Matej commented
This is caused by an internal change in Bukkit in 1.18, we have already patched this for Foundation 6, which will come out as soon as possible in the coming weeks.