@Override public void onEnable() { plugin = this; setupConfigs(); try { if (!configuration.isDebugEnabled()) { disableDatabaseLogging(); } if (!setupConnections()) { return; } setupStorages(); } catch (SQLException e) { getLogger() .warning( "An error occurred attempting to make a database connection, please see stack trace below"); plugin.getPluginLoader().disablePlugin(this); e.printStackTrace(); return; } try { long timeDiff = DateUtils.findTimeDiff(); if (timeDiff > 1) { getLogger() .severe( "The time on your server and MySQL database are out by " + timeDiff + " seconds, this may cause syncing issues."); } } catch (SQLException e) { getLogger() .warning( "An error occurred attempting to find the time difference, please see stack trace below"); plugin.getPluginLoader().disablePlugin(this); e.printStackTrace(); } if (conversionConn != null) { setupConversion(); } setupListeners(); setupCommands(); setupRunnables(); try { MetricsLite metrics = new MetricsLite(this); metrics.start(); } catch (IOException e) { // Failed to submit the stats :-( } }