mirror of
https://github.com/BentoBoxWorld/Level.git
synced 2024-11-27 12:38:21 +01:00
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
Block a user