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 emitted 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 protected, see PlayerProtectEvent to listen for that.

    Type Parameters

    Hierarchy (View Summary)

    Implements

    Index

    Constructors

    Properties

    eventName: "player.checkprotect" = ...
    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>
    room: RoomType
    target: Player<RoomType>

    The other player that the player is attempting to protect.

    Accessors

    Methods

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

      Parameters

      • isValid: boolean

        Whether or not this protect should be considered valid.

      Returns void