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