Class PlayerSetRoleEvent<RoomType>

Emitted when a player has their player role updated.

Type Parameters

Hierarchy

  • BasicEvent
    • PlayerSetRoleEvent

Implements

Properties

eventName: "player.setrole"
eventName: "player.setrole"
message: undefined | SetRoleMessage

The message that this event originated from.

newRole: typeof BaseRole

The new role that the player has, if any.

oldRole: typeof BaseRole

The role that the player had before, if any.

player: PlayerData<RoomType>

The player that this event is for.

room: RoomType

The room or client that the event came from.

Accessors

  • get alteredRole(): typeof BaseRole
  • The altered role that the player will have set instead, if changed.

    Returns typeof BaseRole

Constructors

Methods

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

    Returns void

  • Change the role that the player had set, or completely remove it altogether.

    Parameters

    Returns void

Generated using TypeDoc