Class PlayerSetHatEvent<RoomType>

Emitted when a player has their player hat updated.

Type Parameters

Hierarchy

  • BasicEvent
    • PlayerSetHatEvent

Implements

Properties

eventName: "player.sethat"
eventName: "player.sethat"
message: undefined | SetHatMessage

The message that this event originated from.

newHatId: string

The new hat that the player has.

oldHatId: string

The hat 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 alteredHatId(): string
  • The altered hat that the player will have set instead, if changed.

    Returns string

Constructors

  • Type Parameters

    Parameters

    • room: RoomType
    • player: PlayerData<RoomType>
    • message: undefined | SetHatMessage
    • oldHatId: string

      The hat that the player had before.

    • newHatId: string

      The new hat that the player has.

    Returns PlayerSetHatEvent<RoomType>

Methods

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

    Returns void

  • Change the hat that the player had set.

    Parameters

    • hatId: string

      The hat to set.

    Returns void

Generated using TypeDoc