Options
All
  • Public
  • Public/Protected
  • All
Menu

Class PlayerCheckMurderEvent<RoomType>

Emitted when a player is attempting to murder another player, and is requesting the host to verify the attempt and actually murder the player. Only admitted if the client is the host.

This event is useful if you want to prevent a murder from actually happening, before it happens. Therefore this event doesn't guarantee that the victim is actually dead, see PlayerMurderEvent to listen for that.

Type parameters

  • RoomType: Hostable

Hierarchy

Implements

Index

Properties

Static eventName

eventName: "player.checkmurder" = ...

eventName

eventName: "player.checkmurder" = ...

Readonly isValid

isValid: boolean

Readonly message

message: undefined | CheckMurderMessage

The message that this event originated from.

Readonly player

player: PlayerData<RoomType>

The player that this event is for.

Readonly room

room: RoomType

The room or client that the event came from.

Readonly victim

victim: PlayerData<RoomType>

Accessors

alteredIsValid

  • get alteredIsValid(): boolean

alteredPlayer

  • get alteredPlayer(): PlayerData<RoomType>

alteredVictim

  • get alteredVictim(): PlayerData<RoomType>

Constructors

constructor

  • new PlayerCheckMurderEvent<RoomType>(room: RoomType, player: PlayerData<RoomType>, message: undefined | CheckMurderMessage, victim: PlayerData<RoomType>, isValid: boolean): PlayerCheckMurderEvent<RoomType>

Methods

setPlayer

  • setPlayer(player: PlayerData<RoomType>): void

setValid

  • setValid(isValid: boolean): void
  • Change whether this murder should be consider valid. If valid, ths player will indeed be murdered.

    Parameters

    • isValid: boolean

      Whether or not this murder should be considered valid.

    Returns void

setVictim

  • setVictim(victim: PlayerData<RoomType>): void

Generated using TypeDoc