Interface EventRegistration<T, K, G>

Represents an event registration for a plugin.

interface EventRegistration<T, K, G> {
    eventName: K;
    listener: ListenerFunction<T[K], G>;
    priority?: number;
}

Type Parameters

  • T extends O

    The record mapping event names to their payload types.

  • K extends keyof T

    The specific event name.

  • G extends O

    The game state type.

Properties

eventName: K

The name of the event to listen for.

listener: ListenerFunction<T[K], G>

The listener function that will be invoked when the event is emitted.

priority?: number

The priority of the listener. Higher priority listeners are executed first. Listeners with the same priority are executed concurrently.

0