We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
My code:
Config config = new PluginConfig(this, "config.yml"); if (config.getConfig().isSet("test-path")) config.getConfig().getMapList("test-path").forEach(map -> map.forEach((o, o2) -> System.out.println(o + ": " + o2))); List<Map<String, Object>> mapList = new ArrayList<>(); Map<String, Object> map1 = new HashMap<>(); map1.put("1", "test1"); map1.put("2", "test2"); map1.put("3", "test3"); mapList.add(map1); Map<String, Object> map2 = new HashMap<>(); map2.put("4", "test1"); map2.put("5", "test2"); map2.put("6", "test3"); mapList.add(map2); Map<String, Object> map3 = new HashMap<>(); map3.put("7", "test1"); map3.put("8", "test2"); map3.put("9", "test3"); mapList.add(map3); config.getConfig().set("test-path", mapList); config.saveConfig();
test-path: - '1': test1 '2': test2 '3': test3 - '4': test1 '5': test2 '6': test3 - '7': test1 '8': test2 '9': test3
The text was updated successfully, but these errors were encountered:
This is the intended behaviour since version 1.7.1, where list indentation is the same as YamlConfiguration.options().indent() (2 by default).
YamlConfiguration.options().indent()
Maybe an indentList option can be added to YamlConfigurationOptions to allow this customization.
indentList
Sorry, something went wrong.
The default behaviour was not working properly, so the fix and the indentList option has been released in 1.7.3. See #52 for further details.
Now your example is formatted by default as follows:
You can remove the extra indent to match your example expected output setting indentList to 0.
No branches or pull requests
My code:
The text was updated successfully, but these errors were encountered: