ReturnableEventHook

public final class ReturnableEventHook<T extends ReturnableEvent<R>, R extends Object>

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
public ReturnableEventHook<T, R> ReturnableEventHook<T extends ReturnableEvent<R>, R extends Any>(IEventHandler handlerClass, ReturnableHandler<T, R> 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 ReturnableHandler<T, R> 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 ReturnableHandler<T, R> 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.