Package-level declarations

Types

Link copied to clipboard

Facade of a coroutine session of a single plugin.

Link copied to clipboard
interface MCCoroutine
Link copied to clipboard
class MCCoroutineExceptionEvent(val plugin: <Error class: unknown class>, val exception: Throwable)

A BungeeCord event which is called when an exception is raised in one of the coroutines managed by MCCoroutine. Cancelling this exception causes the error to not get logged and offers to possibility for custom logging.

Link copied to clipboard
abstract class SuspendingCommand
Link copied to clipboard
open class SuspendingPlugin

Properties

Link copied to clipboard
val <Error class: unknown class>.bungeeCordDispatcher: CoroutineContext

Gets the plugin bungeeCord dispatcher.

Link copied to clipboard
val <Error class: unknown class>.scope: <Error class: unknown class>

Gets the plugin coroutine scope.

Functions

Link copied to clipboard
fun <Error class: unknown class>.launch(    context: CoroutineContext = bungeeCordDispatcher,     start: <Error class: unknown class> = CoroutineStart.DEFAULT,     block: suspend <Error class: unknown class>.() -> Unit): <Error class: unknown class>

Launches a new coroutine on the BungeeCord Plugin ThreadPool without blocking the current thread and returns a reference to the coroutine as a Job. The coroutine is cancelled when the resulting job is Job.cancel.

Link copied to clipboard
fun <Error class: unknown class>.registerSuspendingCommand(plugin: <Error class: unknown class>, command: SuspendingCommand)

Registers an command executor with suspending function. Does exactly the same as PluginManager.registerCommand

Link copied to clipboard
fun <Error class: unknown class>.registerSuspendingListener(plugin: <Error class: unknown class>, listener: <Error class: unknown class>)

Registers an event listener with suspending functions. Does exactly the same thing as PluginManager.registerListener but makes suspension functions possible. Example: