Dispatches an operating system event

  • Dispatches an event, calling all registered handlers with the provided arguments.

    Type Parameters

    Parameters

    • name: T

      The name of the event to dispatch

    • ...args: Events[T]

      The arguments to pass to the event handlers

    Returns Promise<void>

    await events.dispatch('item_pickup', 64, 1); // Dispatch diamond pickup event