# Package net.axay.kspigot.event

## Types

SingleListener
Link copied to clipboard
abstract class SingleListener<T : Event>(priority: EventPriority, ignoreCancelled: Boolean) : 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
inline fun <T : Event> SingleListener<T>.register()
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.