skeldjs
    Preparing search index...

    Class PlayerCheckProtectEvent<RoomType>

    Emitted when a player (i.e. a guardian angel) is attempting to protect another player, and is requesting the host to verify the attempt and actually protect the player. Only admitted if the client is the host.

    This event is useful if you want to prevent a protect from actually happening, before it happens. Therefore this event doesn't guarantee that the target is actually dead, see PlayerProtectEvent to listen for that.

    Type Parameters

    Hierarchy (View Summary)

    Implements

    Index

    Constructors

    Properties

    eventName: "player.checkprotect" = ...
    isValid: boolean

    Whether or not this protect would normally be considered valid and thus the player be protected.

    message: undefined | CheckProtectMessage

    The message that this event originated from.

    player: Player<RoomType>

    The player that this event is for.

    room: RoomType

    The room or client that the event came from.

    target: Player<RoomType>

    The other player that the player is attempting to protect.

    eventName: "player.checkprotect" = ...

    Accessors

    Methods

    • Change whether this protect should be consider valid. If valid, ths player will indeed be protected.

      Parameters

      • isValid: boolean

        Whether or not this protect should be considered valid.

      Returns void