Package-level declarations

Types

Link copied to clipboard
abstract class CancelableEvent : Event

Represents an event that can be canceled.

Link copied to clipboard
abstract class Event

Represents a generic event.

Link copied to clipboard
object EventBus
Link copied to clipboard
class EventHook<T : Event>(val handlerClass: IEventHandler, val handler: Handler<T>, val ignoresCondition: Boolean, val priority: Priority = Priority.NORMAL, val condition: () -> Boolean? = null, val timeout: Long? = null)

Represents a hook for an event.

Link copied to clipboard
Functional interface representing a handler for events of type T.
Link copied to clipboard
interface IEventHandler
Interface representing an event handler.
Link copied to clipboard

Represents the priority of an event.

Link copied to clipboard
abstract class ReturnableEvent<T> : Event

Represents an event that can return a result.

Link copied to clipboard
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.

Link copied to clipboard
Functional interface representing a handler for returnable events of type T.

Functions

Link copied to clipboard
inline fun <T : Event> IEventHandler.handler(noinline condition: () -> Boolean = { true }, ignoresCondition: Boolean = false, priority: Priority = Priority.NORMAL, timeout: Long? = null, noinline handler: (T) -> Unit)

Registers an event handler for a specific event type.

Link copied to clipboard
inline fun <T : ReturnableEvent<R>, R> IEventHandler.returnableHandler(noinline condition: () -> Boolean = { true }, ignoresCondition: Boolean = false, priority: Priority = Priority.NORMAL, timeout: Long? = null, noinline returnableHandler: (T) -> R)

Registers a returnable event handler for a specific event type.