SoulFire TypeScript SDK 2.10.3
    Preparing search index...

    Type Alias ContainerButton

    ContainerButton: Message<"soulfire.v1.ContainerButton"> & {
        buttonId: number;
        description?: string;
        disabled: boolean;
        iconItemId?: string;
        label: string;
        selected: boolean;
    }

    A clickable button in a container menu. Used for special interactions like enchantment selection, stonecutter recipes, trade offers, etc.

    Type Declaration

    • buttonId: number

      Button ID to send to the server when clicking. The meaning depends on the container type.

      from field: int32 button_id = 1;

    • Optionaldescription?: string

      Optional tooltip/description text with additional details. Examples: "Requires 3 lapis, 30 levels", "Out of stock"

      from field: optional string description = 4;

    • disabled: boolean

      Whether the button is currently disabled (cannot be clicked). Reasons vary by container: missing materials, out of stock, insufficient levels, etc.

      from field: bool disabled = 5;

    • OptionaliconItemId?: string

      Optional item ID for displaying an icon. Example: "minecraft:enchanted_book", "minecraft:stone_bricks"

      from field: optional string icon_item_id = 3;

    • label: string

      Display label for the button. Examples: "Enchant Slot 1", "Recipe 5", "8x Emerald -> 1x Diamond Pickaxe"

      from field: string label = 2;

    • selected: boolean

      Whether this button is currently selected/active. Used for toggle-style buttons or to show current selection.

      from field: bool selected = 6;

    from message soulfire.v1.ContainerButton