cancel the update checker task on disable
This commit is contained in:
parent
18693df7cc
commit
c34c1c3cbf
1 changed files with 1 additions and 0 deletions
|
@ -159,6 +159,7 @@ public class ZNpcsPlus {
|
||||||
if (configManager.getConfig().checkForUpdates()) {
|
if (configManager.getConfig().checkForUpdates()) {
|
||||||
UpdateChecker updateChecker = new UpdateChecker(getDescription());
|
UpdateChecker updateChecker = new UpdateChecker(getDescription());
|
||||||
scheduler.runDelayedTimerAsync(updateChecker, 5L, 6000L);
|
scheduler.runDelayedTimerAsync(updateChecker, 5L, 6000L);
|
||||||
|
shutdownTasks.add(updateChecker::cancel);
|
||||||
pluginManager.registerEvents(new UpdateNotificationListener(this, adventure, updateChecker, scheduler), bootstrap);
|
pluginManager.registerEvents(new UpdateNotificationListener(this, adventure, updateChecker, scheduler), bootstrap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue