Explorar o código

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.

bm01 %!s(int64=12) %!d(string=hai) anos
pai
achega
2eb593e163
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      src/main/java/com/gmail/nossr50/mcMMO.java

+ 2 - 1
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 {