# Package net.axay.kspigot.event

## Types

SingleListener
Link copied to clipboard
interface SingleListener<T : Event> : Listener
Content copied to clipboard
This class represents a Listener with only one event to listen to.

## Functions

listen
Link copied to clipboard
inline fun <T : Event> listen(priority: EventPriority = EventPriority.NORMAL, ignoreCancelled: Boolean = false, register: Boolean = true, crossinline onEvent: (T) -> Unit): SingleListener<T>
Content copied to clipboard
register
Link copied to clipboard
fun Listener.register()
Content copied to clipboard
Shortcut for registering this listener on the given plugin.
inline fun <T : Event> SingleListener<T>.register(priority: EventPriority = EventPriority.NORMAL, ignoreCancelled: Boolean = false)
Content copied to clipboard
Registers the SingleListener with its event listener.
inline fun <T : Event> Listener.register(priority: EventPriority = EventPriority.NORMAL, ignoreCancelled: Boolean = false, noinline executor: (Listener, Event) -> Unit)
Content copied to clipboard
Registers the event with a custom event executor.
unregister
Link copied to clipboard
fun Listener.unregister()
Content copied to clipboard
Shortcut for unregistering all events in this listener.