just dont do anything with the update checker on shutdown
This commit is contained in:
parent
abfdc1901b
commit
c3a83b6d04
2 changed files with 1 additions and 8 deletions
|
@ -148,10 +148,7 @@ public class ZNpcsPlus {
|
|||
log(ChatColor.WHITE + " * Starting tasks...");
|
||||
if (configManager.getConfig().checkForUpdates()) {
|
||||
UpdateChecker updateChecker = new UpdateChecker(getDescription());
|
||||
scheduler.runLaterAsync(() -> {
|
||||
scheduler.runDelayedTimerAsync(updateChecker, 0L, 6000L);
|
||||
shutdownTasks.add(updateChecker::shutdown);
|
||||
}, 5L);
|
||||
scheduler.runDelayedTimerAsync(updateChecker, 5L, 6000L);
|
||||
pluginManager.registerEvents(new UpdateNotificationListener(this, adventure, updateChecker, scheduler), bootstrap);
|
||||
}
|
||||
|
||||
|
|
|
@ -40,10 +40,6 @@ public class UpdateChecker extends BukkitRunnable {
|
|||
logger.warning("Download it at " + UpdateChecker.DOWNLOAD_LINK);
|
||||
}
|
||||
|
||||
public void shutdown() {
|
||||
cancel();
|
||||
}
|
||||
|
||||
private int versionToNumber(String version) {
|
||||
int num = Integer.parseInt(version.replaceAll("[^0-9]", ""));
|
||||
if (version.toLowerCase().contains("snapshot")) num -= 1;
|
||||
|
|
Loading…
Reference in a new issue