cancel the update checker task on disable

This commit is contained in:
Pyrbu 2023-12-14 13:28:42 +01:00
parent 18693df7cc
commit c34c1c3cbf

@ -159,6 +159,7 @@ public class ZNpcsPlus {
if (configManager.getConfig().checkForUpdates()) {
UpdateChecker updateChecker = new UpdateChecker(getDescription());
scheduler.runDelayedTimerAsync(updateChecker, 5L, 6000L);
shutdownTasks.add(updateChecker::cancel);
pluginManager.registerEvents(new UpdateNotificationListener(this, adventure, updateChecker, scheduler), bootstrap);
}