Skip to content

Commit

Permalink
Check for updates asynchronously
Browse files Browse the repository at this point in the history
  • Loading branch information
UserNugget committed Apr 23, 2024
1 parent 4023a45 commit 2868a69
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/main/java/net/elytrium/limboauth/LimboAuth.java
Original file line number Diff line number Diff line change
Expand Up @@ -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.")
Expand Down

0 comments on commit 2868a69

Please sign in to comment.