diff --git a/src/main/java/me/xginko/villageroptimizer/config/Config.java b/src/main/java/me/xginko/villageroptimizer/config/Config.java index 0606a31..f2f3ccc 100644 --- a/src/main/java/me/xginko/villageroptimizer/config/Config.java +++ b/src/main/java/me/xginko/villageroptimizer/config/Config.java @@ -161,14 +161,16 @@ public class Config { } public ConfigSection getConfigSection(String path, Map defaultKeyValue) { + config.addDefault(path, null); config.makeSectionLenient(path); - config.addDefault(path, defaultKeyValue); + defaultKeyValue.forEach((string, object) -> config.addExample(path+"."+string, object)); return config.getConfigSection(path); } public ConfigSection getConfigSection(String path, Map defaultKeyValue, String comment) { + config.addDefault(path, null, comment); config.makeSectionLenient(path); - config.addDefault(path, defaultKeyValue, comment); + defaultKeyValue.forEach((string, object) -> config.addExample(path+"."+string, object)); return config.getConfigSection(path); }