Skip to content

Commit

Permalink
Added defensive code.
Browse files Browse the repository at this point in the history
  • Loading branch information
tastybento committed Jul 28, 2019
1 parent ff91255 commit 998d539
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ private boolean loadBundles(@NonNull GameModeAddon addon) {
for (File file : bundles) {
try {
BlueprintBundle bb = gson.fromJson(new FileReader(file), BlueprintBundle.class);
blueprintBundles.get(addon).add(bb);
blueprintBundles.putIfAbsent(addon, new ArrayList<>()).add(bb);
plugin.log("Loaded Blueprint Bundle '" + bb.getUniqueId() + FOR + addon.getDescription().getName());
loaded = true;
} catch (Exception e) {
Expand Down

0 comments on commit 998d539

Please sign in to comment.