Class PlayerSetVisorEvent<RoomType>

Emitted when a player has their player visor updated.

Type Parameters

Hierarchy

  • BasicEvent
    • PlayerSetVisorEvent

Implements

Properties

eventName: "player.setvisor"
eventName: "player.setvisor"
message: undefined | SetVisorMessage

The message that this event originated from.

newVisorId: string

The new visor that the player has.

oldVisorId: string

The visor that the player had before.

player: PlayerData<RoomType>

The player that this event is for.

room: RoomType

The room or client that the event came from.

Accessors

  • get alteredVisorId(): string
  • The altered visor that the player will have set instead, if changed.

    Returns string

Constructors

  • Type Parameters

    Parameters

    • room: RoomType
    • player: PlayerData<RoomType>
    • message: undefined | SetVisorMessage
    • oldVisorId: string

      The visor that the player had before.

    • newVisorId: string

      The new visor that the player has.

    Returns PlayerSetVisorEvent<RoomType>

Methods

  • Revert the player's visor back to their old visor.

    Returns void

  • Change the visor that the player had set.

    Parameters

    • visor: string

      The visor to set.

    Returns void

Generated using TypeDoc