UpdateChecker is now async too when using "on-startup"

This commit is contained in:
mfnalex 2019-04-27 15:25:44 +02:00
parent 8019717f50
commit ca721a1b4b

View File

@ -137,8 +137,13 @@ public class JeffChestSortPlugin extends JavaPlugin {
} }
}, 0L, updateCheckInterval * 20); }, 0L, updateCheckInterval * 20);
} else if (getConfig().getString("check-for-updates", "true").equalsIgnoreCase("on-startup")) { } else if (getConfig().getString("check-for-updates", "true").equalsIgnoreCase("on-startup")) {
getServer().getScheduler().scheduleSyncDelayedTask(this, new Runnable() {
@Override
public void run() {
updateChecker.checkForUpdate(); updateChecker.checkForUpdate();
} }
}, 0L);
}
Metrics metrics = new Metrics(this); Metrics metrics = new Metrics(this);