Returns true if this client is participating in the DeathLink mechanic.
Removes an existing event listener.
The event name associated with this listener to remove.
The callback function to remove.
Rest...args: DeathEvents[Event]This object.
Add an event listener for a specific event.
The event name to listen for.
The callback function to fire when this event is received.
Rest...args: DeathEvents[Event]This object.
If DeathLink is enabled, sends a DeathLink to all DeathLink enabled players, otherwise this method does nothing.
The name of the player who died. Can be a slot name, but could also be a name from within a multiplayer game.
Optionalcause: stringOptional text explaining the cause of death. When provided, this should include the player's name.
(e.g., Phar drowned in a vat of kittens.)
DeathLinks sent from this client will not fire a DeathEvents.deathReceived event to avoid an infinite feedback loop of deaths.
Returns a promise that waits for a single specified event to be received. Resolves with the list of arguments dispatched with the event.
The event name to listen for.
An optional predicate to check on incoming events to validate if the correct event has been received. If omitted, will return immediately on next event type received.
Rest...args: DeathEvents[Event]
Manages DeathLink mechanics for clients that choose to opt in to the mechanic.