From 2eb593e1635571ce8ac98b26ce5137cb9a03d506 Mon Sep 17 00:00:00 2001 From: bm01 Date: Sun, 27 Jan 2013 00:07:30 +0100 Subject: [PATCH] Attempt to fix NPE spam when MySQL connection failed This is how it was before my cleanup, I find what the methods do and/or how they're named a little weird, We may want to do something about it. --- src/main/java/com/gmail/nossr50/mcMMO.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/gmail/nossr50/mcMMO.java b/src/main/java/com/gmail/nossr50/mcMMO.java index 278236825..5a9133cb3 100644 --- a/src/main/java/com/gmail/nossr50/mcMMO.java +++ b/src/main/java/com/gmail/nossr50/mcMMO.java @@ -180,7 +180,8 @@ public class mcMMO extends JavaPlugin { //Setup the leader boards if (configInstance.getUseMySQL()) { - Database.connect(); + // TODO: Why do we have to check for a connection that hasn't be made yet? + Database.checkConnected(); Database.createStructure(); } else {