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 643fed4 commit c5e2acc
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/main/java/net/elytrium/fastmotd/FastMOTD.java
Original file line number Diff line number Diff line change
Expand Up @@ -144,12 +144,14 @@ public void onProxyInitialization(ProxyInitializeEvent event) {
public void reload() {
Settings.IMP.reload(this.configPath);

if (!UpdatesChecker.checkVersionByURL("https://raw.githubusercontent.com/Elytrium/FastMOTD/master/VERSION", Settings.IMP.VERSION)) {
this.logger.error("****************************************");
this.logger.warn("The new FastMOTD update was found, please update.");
this.logger.error("https://github.com/Elytrium/FastMOTD/releases/");
this.logger.error("****************************************");
}
this.server.getScheduler().buildTask(this, () -> {
if (!UpdatesChecker.checkVersionByURL("https://raw.githubusercontent.com/Elytrium/FastMOTD/master/VERSION", Settings.IMP.VERSION)) {
this.logger.error("****************************************");
this.logger.warn("The new FastMOTD update was found, please update.");
this.logger.error("https://github.com/Elytrium/FastMOTD/releases/");
this.logger.error("****************************************");
}
}).schedule();
this.metricsFactory.make(this, 15640);

ComponentSerializer<Component, Component, String> serializer = Settings.IMP.SERIALIZER.getSerializer();
Expand Down

0 comments on commit c5e2acc

Please sign in to comment.