register Suspending Listeners
fun <ERROR CLASS>.registerSuspendingListeners(plugin: <ERROR CLASS>, listener: Any)
Content copied to clipboard
Registers an event listener with suspending functions. Does exactly the same thing as PluginManager.registerEvents but makes suspend functions possible. Example:
class MyPlayerJoinListener : Listener{ @EventHandler suspend fun onPlayerJoinEvent(event: PlayerJoinEvent) {
}
}
Parameters
listener
Bukkit Listener.
plugin
Bukkit Plugin.