From eb4e08648262f28a7e4760a79f8044658b12ceb2 Mon Sep 17 00:00:00 2001 From: tastybento Date: Mon, 12 Mar 2018 04:41:45 +0900 Subject: [PATCH] Renamed variable. Removed logger. --- .../bskyblock/database/mysql/MySQLDatabaseHandler.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/main/java/us/tastybento/bskyblock/database/mysql/MySQLDatabaseHandler.java b/src/main/java/us/tastybento/bskyblock/database/mysql/MySQLDatabaseHandler.java index f0d8a7963..ca6d2ec17 100644 --- a/src/main/java/us/tastybento/bskyblock/database/mysql/MySQLDatabaseHandler.java +++ b/src/main/java/us/tastybento/bskyblock/database/mysql/MySQLDatabaseHandler.java @@ -41,7 +41,7 @@ public class MySQLDatabaseHandler extends AbstractDatabaseHandler { */ private Connection connection = null; - private BSkyBlock plugin; + private BSkyBlock bskyblock; /** * Handles the connection to the database and creation of the initial database schema (tables) for @@ -52,7 +52,7 @@ public class MySQLDatabaseHandler extends AbstractDatabaseHandler { */ public MySQLDatabaseHandler(BSkyBlock plugin, Class type, DatabaseConnecter databaseConnecter) { super(plugin, type, databaseConnecter); - this.plugin = plugin; + this.bskyblock = plugin; connection = databaseConnecter.createConnection(); // Check if the table exists in the database and if not, create it createSchema(); @@ -82,7 +82,7 @@ public class MySQLDatabaseHandler extends AbstractDatabaseHandler { // Register adapters builder.registerTypeAdapter(Location.class, new LocationAdapter(plugin)) ; builder.registerTypeAdapter(World.class, new WorldAdapter(plugin)); - builder.registerTypeAdapter(Flag.class, new FlagAdapter(plugin)); + builder.registerTypeAdapter(Flag.class, new FlagAdapter(bskyblock)); builder.registerTypeAdapter(PotionEffectType.class, new PotionEffectTypeAdapter()); // Keep null in the database builder.serializeNulls(); @@ -154,8 +154,6 @@ public class MySQLDatabaseHandler extends AbstractDatabaseHandler { preparedStatement.execute(); } catch (SQLException e) { plugin.getLogger().severe(() -> "Could not save object " + instance.getClass().getName() + " " + e.getMessage()); - // Leave in for now until we know there are no particular issues - e.printStackTrace(); } }