1
0
mirror of https://github.com/mcMMO-Dev/mcMMO.git synced 2026-02-19 02:12:58 +01:00

Misc. cleanup, removed old Logger.getLogger stuff.

Logger.getLogger() replaced with Bukkit.getLogger()
This commit is contained in:
GJ
2012-03-12 17:28:13 -04:00
parent 787ee0220a
commit 49bb3e0a3c
19 changed files with 413 additions and 361 deletions

View File

@@ -9,19 +9,19 @@ import java.util.HashMap;
import java.util.ArrayList;
import java.util.Properties;
import org.bukkit.Bukkit;
import com.gmail.nossr50.config.LoadProperties;
import com.gmail.nossr50.datatypes.DatabaseUpdate;
public class Database {
private mcMMO plugin;
private String connectionString = "jdbc:mysql://" + LoadProperties.MySQLserverName + ":" + LoadProperties.MySQLport + "/" + LoadProperties.MySQLdbName + "?user=" + LoadProperties.MySQLuserName + "&password=" + LoadProperties.MySQLdbPass;
private boolean isConnected;
private Connection conn = null;
public Database(mcMMO instance) {
connect(); //Connect to MySQL
this.plugin = instance;
// Load the driver instance
try {
@@ -29,10 +29,10 @@ public class Database {
DriverManager.getConnection(connectionString);
}
catch (ClassNotFoundException e) {
plugin.getServer().getLogger().warning(e.getLocalizedMessage());
Bukkit.getLogger().warning(e.getLocalizedMessage());
}
catch (SQLException ex) {
plugin.getServer().getLogger().warning(ex.getLocalizedMessage());
Bukkit.getLogger().warning(ex.getLocalizedMessage());
printErrors(ex);
}
}