fix config sections
This commit is contained in:
parent
50c734eccd
commit
b23eb69933
@ -161,14 +161,16 @@ public class Config {
|
||||
}
|
||||
|
||||
public ConfigSection getConfigSection(String path, Map<String, Object> 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<String, Object> 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);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user