Class PlayerSetColorEvent<RoomType>

Emitted when a player has their player color updated.

Type Parameters

Hierarchy

  • BasicEvent
    • PlayerSetColorEvent

Implements

Properties

eventName: "player.setcolor"
eventName: "player.setcolor"
message: undefined | SetColorMessage

The message that this event originated from.

newColor: Color

The new color that the player has.

oldColor: Color

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

    Returns Color

Constructors

Methods

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

    Returns void

  • Change the color that the player had set.

    Parameters

    • color: Color

      The color to set.

    Returns void

Generated using TypeDoc