I have a config file like this:
Now I want to read this config file with those code snippets:
skeleton = manager.load();
Output is 0. Why? I’m really stucked.
I haven’t done any testing, but it might be worth checking
From the looks of it, I am with you in that it looks right.
Here’s the doc for
So the reason its size is 0, is one of two things from what I can find.
value is not of a list type and therefore returns an empty list.
This is determined here: https://github.com/zml2008/configurate/blob/master/configurate-core/src/main/java/ninja/leaping/configurate/SimpleConfigurationNode.java#L457
- The list is actually empty.
Doesn’t really answer your question but hopefully it gives a little more information. Good luck! Will definitely keep an eye on this in-case I need this functionality in the future.
The way you could do it if you are unable to solve the issue is instead just using recursion to load the values.
EDIT: Maybe @zml can shine a little light on this?
#hasListChildren() = false
#hasMapChildren() = true
So I will try to use the map
It’s because getChildrenList() is actually looking for an array such as this node
yeah … blame me … Braindead …