Check that config sections exist before trying to copy them.
This commit is contained in:
parent
8788110a92
commit
0a4b0af931
|
@ -184,6 +184,7 @@ public class Level extends Addon {
|
|||
}
|
||||
|
||||
private void copyConfigSection(YamlConfiguration blockConfig, String sectionName) {
|
||||
if (!getConfig().isConfigurationSection(sectionName)) return;
|
||||
ConfigurationSection section = getConfig().getConfigurationSection(sectionName);
|
||||
for (String k:section.getKeys(true)) {
|
||||
blockConfig.set(sectionName + "." + k, section.get(k));
|
||||
|
|
Loading…
Reference in New Issue