Class PlayerAction<Action>

Type Parameters

Hierarchy

Constructors

  • Do a player action.

    Type Parameters

    • Action extends "SetHotbar" | "SetReducedDebug" | "CloseInv" | "GiveItems" | "NoKeepInv" | "BossBar" | "ParticleSphere" | "SetAtkSpeed" | "SetVelocity" | "Particle" | "AddInvRow" | "DisablePvp" | "NoNatRegen" | "DisplayLightning" | "PlayEntitySound" | "ReplaceProj" | "Damage" | "SetExp" | "SendAnimation" | "SetXPProg" | "SetInventory" | "TpSequence" | "Heal" | "SetSpawnPoint" | "ParticleSpiral" | "SetInventoryKept" | "SetAllowFlight" | "LaunchUp" | "SetMaxHealth" | "RemoveBossBar" | "SetFogDistance" | "GetTargetEntity" | "AdventureMode" | "ForceFlight" | "LoadInv" | "SpectatorMode" | "ClearPotions" | "Kick" | "SetTabListInfo" | "EnablePvp" | "ProjColl" | "HideDisguise" | "SpectateTarget" | "SurvivalMode" | "SetBossBar" | "SetSkin" | "SetStatus" | "SetInvulTicks" | "SetCursorItem" | "SetAbsorption" | "SetFireTicks" | "SetGamemode" | "RemoveInvRow" | "EnableFlight" | "SetStingsStuck" | "DisableBlocks" | "SetScoreObj" | "LSetHealth" | "ParticleEffect" | "ClearInv" | "SetFreezeTicks" | "SetGliding" | "SetRotation" | "RemoveScore" | "DisallowDrops" | "ParticleCircle" | "ClearItems" | "DisplayBlock" | "RideEntity" | "WeatherRain" | "SetFlying" | "RmWorldBorder" | "DisplayBlockOpen" | "SetHandItem" | "SendAdvancement" | "Teleport" | "ClearChat" | "SetAllowPVP" | "SetMenuItem" | "LaunchToward" | "SetArmor" | "DisplayGateway" | "DisableFlight" | "SetVisualFire" | "SetDisguiseVisible" | "SetArrowsStuck" | "GiveExp" | "FaceLocation" | "ClearScoreboard" | "SetItems" | "KeepInv" | "ReplaceItems" | "ActionBar" | "SetChatTag" | "SendMessage" | "ShiftWorldBorder" | "SetSlotItem" | "PlaySoundSeq" | "ParticleLineA" | "DisplaySignText" | "Respawn" | "SetSpeed" | "ExpandInv" | "SetInvName" | "LaunchProj" | "SetItemCooldown" | "SetPlayerWeather" | "SendHover" | "NoProjColl" | "ShowDisguise" | "SetAirTicks" | "DisplayPickup" | "ParticleCuboidA" | "ChatColor" | "SetWorldBorder" | "SetPlayerTime" | "NatRegen" | "GivePotion" | "PlaySound" | "SetCompass" | "RemoveItems" | "BoostElytra" | "RngTeleport" | "SaveInv" | "OpenBook" | "SetHealth" | "MobDisguise" | "BlockDisguise" | "RollbackBlocks" | "NoDeathDrops" | "EnableBlocks" | "WalkSpeed" | "OpenBlockInv" | "SetCollidable" | "LaunchFwd" | "ParticleCircleA" | "SetFallDistance" | "CreativeMode" | "SetEquipment" | "AttackAnimation" | "GiveRngItem" | "SetDropsEnabled" | "RemovePotion" | "DisplayHologram" | "DisplayFracture" | "SetEntityHidden" | "SetSidebar" | "AllowDrops" | "DeathDrops" | "Vibration" | "ShowInv" | "SetSlot" | "ParticleRay" | "SetFoodLevel" | "PlayerDisguise" | "ParticleCuboid" | "SendMessageSeq" | "SetSaturation" | "WeatherClear" | "Undisguise" | "ParticleSpiralA" | "SendTitle" | "InstantRespawn" | "SetScore" | "StopSound" | "SetNameColor" | "ParticleLine"

    Parameters

    • action: Action

      Action to perform.

    • Optional target: DFTarget
    • Rest ...args: DFValueType[]

      Arguments to pass.

    Returns PlayerAction<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<"player_action", 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: "player_action"

Type of the codeblock.

Methods

  • Serialize the object into a readable DiamondFire format.

    Returns

    DiamondFire codeblock object.

    Returns RawDFActionBlock<"player_action", "SetHotbar" | "SetReducedDebug" | "CloseInv" | "GiveItems" | "NoKeepInv" | "BossBar" | "ParticleSphere" | "SetAtkSpeed" | "SetVelocity" | "Particle" | "AddInvRow" | "DisablePvp" | "NoNatRegen" | "DisplayLightning" | "PlayEntitySound" | "ReplaceProj" | "Damage" | "SetExp" | "SendAnimation" | "SetXPProg" | "SetInventory" | "TpSequence" | "Heal" | "SetSpawnPoint" | "ParticleSpiral" | "SetInventoryKept" | "SetAllowFlight" | "LaunchUp" | "SetMaxHealth" | "RemoveBossBar" | "SetFogDistance" | "GetTargetEntity" | "AdventureMode" | "ForceFlight" | "LoadInv" | "SpectatorMode" | "ClearPotions" | "Kick" | "SetTabListInfo" | "EnablePvp" | "ProjColl" | "HideDisguise" | "SpectateTarget" | "SurvivalMode" | "SetBossBar" | "SetSkin" | "SetStatus" | "SetInvulTicks" | "SetCursorItem" | "SetAbsorption" | "SetFireTicks" | "SetGamemode" | "RemoveInvRow" | "EnableFlight" | "SetStingsStuck" | "DisableBlocks" | "SetScoreObj" | "LSetHealth" | "ParticleEffect" | "ClearInv" | "SetFreezeTicks" | "SetGliding" | "SetRotation" | "RemoveScore" | "DisallowDrops" | "ParticleCircle" | "ClearItems" | "DisplayBlock" | "RideEntity" | "WeatherRain" | "SetFlying" | "RmWorldBorder" | "DisplayBlockOpen" | "SetHandItem" | "SendAdvancement" | "Teleport" | "ClearChat" | "SetAllowPVP" | "SetMenuItem" | "LaunchToward" | "SetArmor" | "DisplayGateway" | "DisableFlight" | "SetVisualFire" | "SetDisguiseVisible" | "SetArrowsStuck" | "GiveExp" | "FaceLocation" | "ClearScoreboard" | "SetItems" | "KeepInv" | "ReplaceItems" | "ActionBar" | "SetChatTag" | "SendMessage" | "ShiftWorldBorder" | "SetSlotItem" | "PlaySoundSeq" | "ParticleLineA" | "DisplaySignText" | "Respawn" | "SetSpeed" | "ExpandInv" | "SetInvName" | "LaunchProj" | "SetItemCooldown" | "SetPlayerWeather" | "SendHover" | "NoProjColl" | "ShowDisguise" | "SetAirTicks" | "DisplayPickup" | "ParticleCuboidA" | "ChatColor" | "SetWorldBorder" | "SetPlayerTime" | "NatRegen" | "GivePotion" | "PlaySound" | "SetCompass" | "RemoveItems" | "BoostElytra" | "RngTeleport" | "SaveInv" | "OpenBook" | "SetHealth" | "MobDisguise" | "BlockDisguise" | "RollbackBlocks" | "NoDeathDrops" | "EnableBlocks" | "WalkSpeed" | "OpenBlockInv" | "SetCollidable" | "LaunchFwd" | "ParticleCircleA" | "SetFallDistance" | "CreativeMode" | "SetEquipment" | "AttackAnimation" | "GiveRngItem" | "SetDropsEnabled" | "RemovePotion" | "DisplayHologram" | "DisplayFracture" | "SetEntityHidden" | "SetSidebar" | "AllowDrops" | "DeathDrops" | "Vibration" | "ShowInv" | "SetSlot" | "ParticleRay" | "SetFoodLevel" | "PlayerDisguise" | "ParticleCuboid" | "SendMessageSeq" | "SetSaturation" | "WeatherClear" | "Undisguise" | "ParticleSpiralA" | "SendTitle" | "InstantRespawn" | "SetScore" | "StopSound" | "SetNameColor" | "ParticleLine">

Generated using TypeDoc