Options
All
  • Public
  • Public/Protected
  • All
Menu

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

  • RoomType: Hostable

Hierarchy

Implements

Index

Properties

Constructors

Methods

Properties

Static eventName

eventName: "player.die" = ...

eventName

eventName: "player.die" = ...

Readonly player

player: PlayerData<RoomType>

The player that this event is for.

Readonly reason

reason: string

reverted

reverted: boolean

Readonly room

room: RoomType

The room or client that the event came from.

Constructors

constructor

  • new PlayerDieEvent<RoomType>(room: RoomType, player: PlayerData<RoomType>, reason: string): PlayerDieEvent<RoomType>
  • Type parameters

    • RoomType: Hostable<any, RoomType>

    Parameters

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

    Returns PlayerDieEvent<RoomType>

Methods

revert

  • revert(): void

Generated using TypeDoc