Script API - v1.26.10.23
    Preparing search index...

    Class EntityEquippableComponent

    import { EquipmentSlot, Player } from "@minecraft/server";

    function clearOffhand(player: Player) {
    const equippable = player.getComponent("minecraft:equippable");
    equippable.setEquipment(EquipmentSlot.Offhand); // Assuming undefined (empty slot) as an example
    }
    import { world, EquipmentSlot } from "@minecraft/server";

    const player = world.getPlayers()[0];
    const equippable = player.getComponent("equippable");
    const slot = equippable.getEquipmentSlot(EquipmentSlot.Mainhand);

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    entity: Entity

    This property can throw errors.

    InvalidEntityError

    This property can't be read in early-execution mode.

    isValid: boolean
    totalArmor: number

    This property can throw errors.

    InvalidEntityError

    This property can't be read in early-execution mode.

    totalToughness: number

    This property can throw errors.

    InvalidEntityError

    This property can't be read in early-execution mode.

    typeId: string

    Methods