diff --git a/src/main/java/net/elytrium/limboauth/LimboAuth.java b/src/main/java/net/elytrium/limboauth/LimboAuth.java index 792bd0bc..1b459a67 100644 --- a/src/main/java/net/elytrium/limboauth/LimboAuth.java +++ b/src/main/java/net/elytrium/limboauth/LimboAuth.java @@ -225,12 +225,14 @@ public void onProxyInitialization(ProxyInitializeEvent event) { metrics.addCustomChart(new SimplePie("save_uuid", () -> String.valueOf(Settings.IMP.MAIN.SAVE_UUID))); metrics.addCustomChart(new SingleLineChart("registered_players", () -> Math.toIntExact(this.playerDao.countOf()))); - if (!UpdatesChecker.checkVersionByURL("https://raw.githubusercontent.com/Elytrium/LimboAuth/master/VERSION", Settings.IMP.VERSION)) { - LOGGER.error("****************************************"); - LOGGER.warn("The new LimboAuth update was found, please update."); - LOGGER.error("https://github.com/Elytrium/LimboAuth/releases/"); - LOGGER.error("****************************************"); - } + this.server.getScheduler().buildTask(this, () -> { + if (!UpdatesChecker.checkVersionByURL("https://raw.githubusercontent.com/Elytrium/LimboAuth/master/VERSION", Settings.IMP.VERSION)) { + LOGGER.error("****************************************"); + LOGGER.warn("The new LimboAuth update was found, please update."); + LOGGER.error("https://github.com/Elytrium/LimboAuth/releases/"); + LOGGER.error("****************************************"); + } + }).schedule(); } @SuppressFBWarnings(value = "NP_NULL_ON_SOME_PATH", justification = "LEGACY_AMPERSAND can't be null in velocity.")