EventHook

public final class EventHook<T extends Event>

Represents a hook for an event.

Parameters

T

The type of event.

Constructors

Link copied to clipboard
public EventHook<T> EventHook<T extends Event>(IEventHandler handlerClass, Handler<T> handler, Boolean ignoresCondition, Priority priority, Function0<Boolean> condition, Long timeout)

Properties

Link copied to clipboard
private final Function0<Boolean> condition

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

Link copied to clipboard
private final Handler<T> handler

The handler function for the event.

Link copied to clipboard

The class of the event handler.

Link copied to clipboard
private final Boolean ignoresCondition

Whether the condition should be ignored.

Link copied to clipboard
private final Priority priority

The priority of the event hook.

Link copied to clipboard
private final Long timeout

An optional timeout for the event hook.

Functions

Link copied to clipboard
public final Function0<Boolean> getCondition()

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

Link copied to clipboard
public final Handler<T> getHandler()

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
public final Priority getPriority()

The priority of the event hook.

Link copied to clipboard
public final Long getTimeout()

An optional timeout for the event hook.