Skip to content
This repository has been archived by the owner on Jan 16, 2019. It is now read-only.

Commit

Permalink
fix troubles loading empty yaml files
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Jan 3, 2019
1 parent fb3e5ce commit 2cc2c3f
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -253,15 +253,16 @@ public void execute(final ScriptEntry scriptEntry) throws CommandExecutionExcept
fis.close();
}
catch (Exception e) {
dB.echoError(e);
dB.echoError("Failed to load yaml file: " + e);
return;
}
if (yamls.containsKey(id)) {
yamls.remove(id);
}
if (yamlConfiguration != null) {
yamls.put(id, yamlConfiguration);
if (yamlConfiguration == null) {
yamlConfiguration = new YamlConfiguration();
}
yamls.put(id, yamlConfiguration);
break;

case UNLOAD:
Expand Down

0 comments on commit 2cc2c3f

Please sign in to comment.