ReturnableEventHook

class ReturnableEventHook<T : ReturnableEvent<R>, R>(val handlerClass: IEventHandler, val handler: ReturnableHandler<T, R>, val ignoresCondition: Boolean, val priority: Priority = Priority.NORMAL, val condition: () -> Boolean? = null, val timeout: Long? = null)

Represents a hook for a returnable event.

Parameters

T

The type of event.

R

The type of the result returned by the handler.

Constructors

Link copied to clipboard
constructor(handlerClass: IEventHandler, handler: ReturnableHandler<T, R>, ignoresCondition: Boolean, priority: Priority = Priority.NORMAL, condition: () -> Boolean? = null, timeout: Long? = null)

Properties

Link copied to clipboard
val condition: () -> Boolean? = null

An optional condition that must be met for the handler to be executed.

Link copied to clipboard

The handler function for the event.

Link copied to clipboard

The class of the event handler.

Link copied to clipboard

Whether the condition should be ignored.

Link copied to clipboard

The priority of the event hook.

Link copied to clipboard
val timeout: Long? = null

An optional timeout for the event hook.