diff --git a/Level/src/bskyblock/addin/level/Level.java b/Level/src/bskyblock/addin/level/Level.java index d6fb0aa..0c5c757 100644 --- a/Level/src/bskyblock/addin/level/Level.java +++ b/Level/src/bskyblock/addin/level/Level.java @@ -60,8 +60,12 @@ public class Level extends JavaPlugin { database = BSBDatabase.getDatabase(); // Set up the database handler to store and retrieve Island classes handler = (AbstractDatabaseHandler) database.getHandler(bSkyBlock, Levels.class); + levelsDatabase = new Levels(); try { levelsDatabase = handler.loadObject("addon-levels"); + if (levelsDatabase == null) { + levelsDatabase = new Levels(); + } } catch (InstantiationException | IllegalAccessException | IllegalArgumentException | InvocationTargetException | SecurityException | ClassNotFoundException | IntrospectionException | SQLException e) {