Class PlayerProtectEvent<RoomType>

Emitted when a player (who is a guardian angel) protects another player.

Due to technical limitations, this event cannot be reverted without advanced "breaking game", therefore it is out of scope of a single .revert() function. However, see PlayerCheckProtectEvent to see about canceling a protection before it happens if you are the host.

Type Parameters

Hierarchy

  • BasicEvent
    • PlayerProtectEvent

Implements

Properties

eventName: "player.protect"
duration: number

The duration, in seconds, for how long the player is protected for.

eventName: "player.protect"
message: undefined | ProtectPlayerMessage

The message that this event originated from.

player: PlayerData<RoomType>

The player that this event is for.

room: RoomType

The room or client that the event came from.

target: PlayerData<RoomType>

The player that was protected.

Constructors

  • Type Parameters

    Parameters

    • room: RoomType
    • player: PlayerData<RoomType>
    • message: undefined | ProtectPlayerMessage
    • target: PlayerData<RoomType>

      The player that was protected.

    • duration: number

      The duration, in seconds, for how long the player is protected for.

    Returns PlayerProtectEvent<RoomType>

Generated using TypeDoc