Added defensive code.

https://github.com/BentoBoxWorld/BentoBox/issues/868
This commit is contained in:
tastybento 2019-07-28 13:31:35 -07:00
parent ff91255a6a
commit 998d5390d1

View File

@ -188,7 +188,7 @@ public class BlueprintsManager {
for (File file : bundles) { for (File file : bundles) {
try { try {
BlueprintBundle bb = gson.fromJson(new FileReader(file), BlueprintBundle.class); 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()); plugin.log("Loaded Blueprint Bundle '" + bb.getUniqueId() + FOR + addon.getDescription().getName());
loaded = true; loaded = true;
} catch (Exception e) { } catch (Exception e) {