mirror of
https://github.com/BentoBoxWorld/Level.git
synced 2024-12-24 18:17:41 +01:00
Fix for where initial database table is blank.
This commit is contained in:
parent
f1842e2141
commit
e47293a883
@ -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<Levels>) 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) {
|
||||
|
Loading…
Reference in New Issue
Block a user