Use holders from KSpigotMainInstance

This commit is contained in:
Jakob K
2021-06-15 20:07:19 +02:00
parent 8ffaee3d51
commit d66fbd7979
2 changed files with 6 additions and 5 deletions

View File

@@ -77,14 +77,14 @@ fun task(
if (isCancelled) {
if (safe || ranOut)
KRunnableHolder.activate(this)
KSpigotMainInstance.kRunnableHolder.activate(this)
else
KRunnableHolder.remove(this)
KSpigotMainInstance.kRunnableHolder.remove(this)
}
}
}
if (endCallback != null) KRunnableHolder.add(bukkitRunnable, endCallback, safe)
if (endCallback != null) KSpigotMainInstance.kRunnableHolder.add(bukkitRunnable, endCallback, safe)
if (period != null)
if (sync) bukkitRunnable.runTaskTimer(KSpigotMainInstance, delay, period)