Skip to content

Commit

Permalink
Check that config sections exist before trying to copy them.
Browse files Browse the repository at this point in the history
  • Loading branch information
tastybento committed Apr 20, 2020
1 parent 8788110 commit 0a4b0af
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/main/java/world/bentobox/level/Level.java
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ private boolean loadSettings() {
}

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));
Expand Down

0 comments on commit 0a4b0af

Please sign in to comment.