Skip to content

Scheduler

Bogdan edited this page Sep 30, 2023 · 3 revisions

All tasks should be activated in method AtumPlugin#handleReload()

That's because all the tasks are cancelled on AtumPlugin#reload() called. This method is also called after AtumPlugin#handleEnable() so, if you activate the task there, it will simply run once.

Use AtumPlugin#getScheduler() istead of Bukkit#getScheduler#run... that class has more convenient methods to work with tasks, especially if you use Kotlin

Clone this wiki locally