Bukkit Main Thread Dispatcher
class BukkitMainThreadDispatcher(plugin: Plugin, tickRate: Long) : CoroutineDispatcher, Runnable, Delay(source)
A CoroutineDispatcher that runs on the Bukkit main thread. As it is tied to the server's tick loop (internally converting all "milliseconds" to "ticks"), execution speed is determined by the server's tick rate. This means that if the server's TPS is 10, and a coroutine delays for 1000 milliseconds, it will actually delay for at least 2000 milliseconds, as the server is running at half speed.
Parameters
plugin
The plugin instance to use for scheduling tasks. If the plugin is disabled, the dispatcher will not execute any tasks.
tick Rate
The tick rate to use for scheduling tasks. This determines how often the dispatcher checks for tasks to execute. Measured in ticks.
Functions
Link copied to clipboard
Creates a CoroutineContext for a child coroutine, with a Job that is a child of the current context's Job
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun invokeOnTimeout(timeMillis: Long, block: Runnable, context: CoroutineContext): DisposableHandle
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override fun scheduleResumeAfterDelay(timeMillis: Long, continuation: CancellableContinuation<Unit>)