# net.axay.kspigot.event

# Package net.axay.kspigot.event

## Types

SingleListener
Link copied to clipboard

This class represents a Listener with only one event to listen to.

interface SingleListener<T : Event> : Listener
Content copied to clipboard

## Functions

listen
Link copied to clipboard
inline fun <T : Event> listen(priority: EventPriority, ignoreCancelled: Boolean, crossinline onEvent: (T) -> Unit): SingleListener<T>
Content copied to clipboard
register
Link copied to clipboard

Shortcut for registering this listener on the given plugin.

fun Listener.register()
Content copied to clipboard

Registers the SingleListener with its event listener.

inline fun <T : Event> SingleListener<T>.register(priority: EventPriority, ignoreCancelled: Boolean)
Content copied to clipboard

Registers the event with a custom event executor.

inline fun <T : Event> Listener.register(priority: EventPriority, ignoreCancelled: Boolean, noinline executor: (Listener, Event) -> Unit)
Content copied to clipboard
unregister
Link copied to clipboard

Shortcut for unregistering all events in this listener.

fun Listener.unregister()
Content copied to clipboard