|
|
|
@ -130,10 +130,12 @@ public class BukkitHuskSync extends JavaPlugin implements HuskSync {
|
|
|
|
|
|
|
|
|
|
// Prepare database connection
|
|
|
|
|
this.database = new MySqlDatabase(this);
|
|
|
|
|
log(Level.INFO, "Attempting to establish connection to the " + settings.getDatabaseType().getDisplayName() + " database...");
|
|
|
|
|
log(Level.INFO, String.format("Attempting to establish connection to the %s database...",
|
|
|
|
|
settings.getDatabaseType().getDisplayName()));
|
|
|
|
|
this.database.initialize();
|
|
|
|
|
if (initialized.get()) {
|
|
|
|
|
log(Level.INFO, "Successfully established a connection to the database");
|
|
|
|
|
log(Level.INFO, String.format("Successfully established a connection to the %s database",
|
|
|
|
|
settings.getDatabaseType().getDisplayName()));
|
|
|
|
|
} else {
|
|
|
|
|
throw new HuskSyncInitializationException("Failed to establish a connection to the database. " +
|
|
|
|
|
"Please check the supplied database credentials in the config file");
|
|
|
|
|