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

Hierarchy

  • BasicEvent
    • PlayerCheckMurderEvent

Implements

Properties

eventName: "player.checkmurder"
eventName: "player.checkmurder"
isValid: boolean

Whether or not this murder would normally be considered valid and thus the player be murdered.

message: undefined | CheckMurderMessage

The message that this event originated from.

player: PlayerData<RoomType>

The player that this event is for.

room: RoomType

The room or client that the event came from.

victim: PlayerData<RoomType>

The other player that the player is attempting to murder.

Accessors

  • get alteredIsValid(): boolean
  • Whether or not this murder will be considered valid instead, if altered.

    Returns boolean

  • get alteredPlayer(): PlayerData<RoomType>
  • The player that will murder the victim instead, if altered.

    Returns PlayerData<RoomType>

  • get alteredVictim(): PlayerData<RoomType>
  • The player that will murdered instead, if altered.

    Returns PlayerData<RoomType>

Constructors

  • Type Parameters

    Parameters

    • room: RoomType
    • player: PlayerData<RoomType>
    • message: undefined | CheckMurderMessage
    • victim: PlayerData<RoomType>

      The other player that the player is attempting to murder.

    • isValid: boolean

      Whether or not this murder would normally be considered valid and thus the player be murdered.

    Returns PlayerCheckMurderEvent<RoomType>

Methods

  • Change the player that will actually murder the victim.

    Parameters

    Returns 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

  • Change the player that will actually be murdered.

    Parameters

    • victim: PlayerData<RoomType>

      The player to murder.

    Returns void

Generated using TypeDoc