Class PlayerSetNameEvent<RoomType>

Emitted when a player has their player name updated.

Type Parameters

Hierarchy

  • BasicEvent
    • PlayerSetNameEvent

Implements

Properties

eventName: "player.setname"
eventName: "player.setname"
message: undefined | SetNameMessage

The message that this event originated from.

newName: string

The new name that the player has.

oldName: string

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

    Returns string

Constructors

  • Type Parameters

    Parameters

    • room: RoomType
    • player: PlayerData<RoomType>
    • message: undefined | SetNameMessage
    • oldName: string

      The name that the player had before.

    • newName: string

      The new name that the player has.

    Returns PlayerSetNameEvent<RoomType>

Methods

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

    Returns void

  • Change the name that the player had set.

    Parameters

    • name: string

      The name to set.

    Returns void

Generated using TypeDoc