Class PlayerDieEvent<RoomType>

Emitted when a player dies, either by being murdered or being exiled. Unlike PlayerMurderEvent, this event can be reverted to bring the player back to life, but note that their body will not be removed due to technical limitations.

Type Parameters

Hierarchy

  • RevertableEvent
    • PlayerDieEvent

Implements

Properties

Constructors

Methods

Properties

eventName: "player.die"
eventName: "player.die"
player: PlayerData<RoomType>

The player that this event is for.

reason: string

Whether or not the player died by being exiled. SkeldJS only uses 'murder' or 'exile', although this can be anything.

reverted: boolean
room: RoomType

The room or client that the event came from.

Constructors

  • Type Parameters

    Parameters

    • room: RoomType
    • player: PlayerData<RoomType>
    • reason: string

      Whether or not the player died by being exiled. SkeldJS only uses 'murder' or 'exile', although this can be anything.

    Returns PlayerDieEvent<RoomType>

Methods

  • Returns void

Generated using TypeDoc