Class PlayerEvent<Action>

Type Parameters

Hierarchy

Constructors

  • When a player does something.

    Type Parameters

    • Action extends "CloseInv" | "Respawn" | "StartFly" | "BreakBlock" | "StartSprint" | "MobKillPlayer" | "ShootBow" | "StopFly" | "LeftClick" | "PlayerTakeDmg" | "ProjHit" | "KillPlayer" | "VehicleJump" | "ClickInvSlot" | "SwapHands" | "DamageEntity" | "Sneak" | "PlayerHeal" | "ClickPlayer" | "Consume" | "Death" | "PlaceBlock" | "Walk" | "PickUpItem" | "Dismount" | "CloudImbuePlayer" | "Leave" | "DropItem" | "ChangeSlot" | "ClickEntity" | "HorseJump" | "ShootProjectile" | "Unsneak" | "Fish" | "FallDamage" | "BreakItem" | "LoopEvent" | "RightClick" | "ClickMenuSlot" | "Riptide" | "KillMob" | "Join" | "EntityDmgPlayer" | "StopSprint" | "Jump" | "ProjDmgPlayer" | "Command" | "PlayerDmgPlayer"

    Parameters

    • event: Action

      Event to listen for.

    Returns PlayerEvent<Action>

Properties

_componentName: string = "serializable"

The component's name

action: Action

The action to perform.

args: DFValueType[]

Arguments to pass.

isInverted: boolean = false

If the codeblock is inverted (mostly for conditional blocks).

tags: BLTagArray<"event", Action> = ...

The tags of the action on this action block.

Remark

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

target: DFTarget = ...

The target for the action.

type: "event"

Type of the codeblock.

Methods

  • Serialize the object into a readable DiamondFire format.

    Returns

    DiamondFire codeblock object.

    Returns RawDFActionBlock<"event", "CloseInv" | "Respawn" | "StartFly" | "BreakBlock" | "StartSprint" | "MobKillPlayer" | "ShootBow" | "StopFly" | "LeftClick" | "PlayerTakeDmg" | "ProjHit" | "KillPlayer" | "VehicleJump" | "ClickInvSlot" | "SwapHands" | "DamageEntity" | "Sneak" | "PlayerHeal" | "ClickPlayer" | "Consume" | "Death" | "PlaceBlock" | "Walk" | "PickUpItem" | "Dismount" | "CloudImbuePlayer" | "Leave" | "DropItem" | "ChangeSlot" | "ClickEntity" | "HorseJump" | "ShootProjectile" | "Unsneak" | "Fish" | "FallDamage" | "BreakItem" | "LoopEvent" | "RightClick" | "ClickMenuSlot" | "Riptide" | "KillMob" | "Join" | "EntityDmgPlayer" | "StopSprint" | "Jump" | "ProjDmgPlayer" | "Command" | "PlayerDmgPlayer">

Generated using TypeDoc