SingleListener

abstract class SingleListener<T : Event>(priority: EventPriority, ignoreCancelled: Boolean) : Listener

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

Constructors

SingleListener
Link copied to clipboard
fun SingleListener(priority: EventPriority, ignoreCancelled: Boolean)

Functions

onEvent
Link copied to clipboard
abstract fun onEvent(event: T)

Properties

ignoreCancelled
Link copied to clipboard
val ignoreCancelled: Boolean
priority
Link copied to clipboard
val priority: EventPriority

Extensions

register
Link copied to clipboard
inline fun <T : Event> SingleListener<T>.register()
Registers the SingleListener with its event listener.