register Suspend
Registers an event listener with suspending functions. Does exactly the same thing as server.getEventManager().register but makes suspension functions possible. Example:
class MyListener { @Subscribe suspend fun onLoginEvent(event: PostLoginEvent) {
}
}
Parameters
listener
Velocity Listener.
plugin
Velocity Plugin.
Registers a new event listener with a functional style listener.
Parameters
plugin
Velocity Plugin.
event Class
Velocity Event class
handler
suspend invocation
Registers a new event listener with a functional style listener.
Parameters
plugin
Velocity Plugin.
event Class
Velocity Event class
post Order
postOrder parameter,
handler
suspend invocation
fun <ERROR CLASS>.registerSuspend(meta: <ERROR CLASS>, command: SuspendingSimpleCommand, plugin: Any)
Content copied to clipboard
Registers an command executor with suspending function. Does exactly the same as CommandManager.register
Parameters
meta
CommandMeta.
plugin
Velocity Plugin.
command
SuspendingCommand.