private void checkUpdates() { // Ignore milliseconds - it's pointless long currentTime = System.currentTimeMillis() / MILLI_PER_SECOND; try { long updateTime = config.getAutoLastTime() + config.getAutoDelay(); // Should we update? if (currentTime > updateTime && !updater.isChecking()) { // Initiate the update as if it came from the console if (config.isAutoDownload()) commandProtocol.updateVersion(getServer().getConsoleSender(), false); else if (config.isAutoNotify()) commandProtocol.checkVersion(getServer().getConsoleSender(), false); else commandProtocol.updateFinished(); } } catch (Exception e) { reporter.reportDetailed(this, Report.newBuilder(REPORT_CANNOT_UPDATE_PLUGIN).error(e)); UPDATES_DISABLED = true; } }