-
Notifications
You must be signed in to change notification settings - Fork 3
Database
TimmyOVO edited this page May 1, 2020
·
3 revisions
try {
this.databaseManager = DatabaseManager.newBuilder()
.withName("onlinereward")
.withOwnerPlugin(this)
.withSqlConfiguration(DatabaseManager.setupDatabase(this))
.withModelClass(Arrays.asList(OnlineModel.class))
.build()
.openConnection();
} catch (DatabaseInitException | ConfigurationException e) {
getLogger().warning("Database failed to connect because " + e.getLocalizedMessage());
getServer().getPluginManager().disablePlugin(this);
return;
}
- Database configuration will auto create for you, if it dose not exists.