Class PlayerSetPetEvent<RoomType>

Emitted when a player has their player pet updated.

Type Parameters

Hierarchy

  • BasicEvent
    • PlayerSetPetEvent

Implements

Properties

eventName: "player.setpet"
eventName: "player.setpet"
message: undefined | SetPetMessage

The message that this event originated from.

newPetId: string

The new pet that the player has.

oldPetId: string

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

    Returns string

Constructors

  • Type Parameters

    Parameters

    • room: RoomType
    • player: PlayerData<RoomType>
    • message: undefined | SetPetMessage
    • oldPetId: string

      The pet that the player had before.

    • newPetId: string

      The new pet that the player has.

    Returns PlayerSetPetEvent<RoomType>

Methods

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

    Returns void

  • Change the pet that the player had set.

    Parameters

    • pet: string

      The pet to set.

    Returns void

Generated using TypeDoc