Class PlayerCondition<Condition>

Type Parameters

Hierarchy

Constructors

  • If a player did something.

    Type Parameters

    • Condition extends "IsLookingAt" | "InWorldBorder" | "HasRoomForItem" | "IsHoldingOff" | "NoItemCooldown" | "IsUsingItem" | "HasAllItems" | "IsSwimming" | "HasItem" | "BlockEquals" | "IsWearing" | "IsNear" | "IsRiding" | "StandingOn" | "CmdEquals" | "IsGrounded" | "CursorItem" | "SlotEquals" | "ItemEquals" | "IsHoldingMain" | "IsHolding" | "MenuSlotEquals" | "IsBlocking" | "HasPermission" | "IsSneaking" | "IsFlying" | "HasPotion" | "NameEquals" | "InvOpen" | "HasSlotItem" | "IsSprinting" | "IsGliding" | "CmdArgEquals"

    Parameters

    • condition: Condition

      Action of condition.

    • Optional target: DFTarget

      Target of the condition.

    • Rest ...args: DFValueType[]

      Arguments to pass.

    Returns PlayerCondition<Condition>

Properties

_componentName: string = "serializable"

The component's name

action: Condition

The action to check for.

args: DFValueType[]

Arguments to pass.

closingBracket: default<"norm", "close"> = ...

Reference property to the closing bracket of this conditional block.

isInverted: boolean = false

If the condition is inverted.

openingBracket: default<"norm", "open"> = ...

Reference property to the opening bracket of this conditional block.

tags: BLTagArray<"if_player", Condition> = ...

The tags of the action on this conditional block.

Remark

Will be an empty array if the action has no tags.

target: DFTarget = ...

Target of the action.

type: "if_player"

Type of the codeblock.

Methods

  • Parameters

    • raw: RawDFConditionalBlock<"repeat" | "call_func" | "func" | "start_process" | "process" | "player_action" | "if_player" | "control" | "set_var" | "entity_event" | "event" | "if_entity" | "entity_action" | "if_var" | "select_obj" | "game_action" | "else" | "if_game">

    Returns readonly [RawDFConditionalBlock<"repeat" | "call_func" | "func" | "start_process" | "process" | "player_action" | "if_player" | "control" | "set_var" | "entity_event" | "event" | "if_entity" | "entity_action" | "if_var" | "select_obj" | "game_action" | "else" | "if_game">, RawDFBracketBlock<DFBracketBlockType, "open">, DFAnySerializedBlock, RawDFBracketBlock<DFBracketBlockType, "close">]

Generated using TypeDoc