Skip to main content

Equipment Actions

EquipmentActions wraps equip and unequip writes with result-aware returns.

Equip actions:

  • EquipmentActions.equip(String name) - right-clicks the named inventory item and sends "Wear", "Wield", or "Equip" (whichever the item exposes)
  • EquipmentActions.unequip(EquipmentInventorySlot slot) - sends "Remove" on the item in the given slot; returns TARGET_NOT_FOUND if slot is empty
  • EquipmentActions.unequip(String name) - removes the first equipped item whose display name matches (tags stripped)

Read equipped slots and item state through EquipmentApi or EquipmentQuery; see Query Helpers.

Example:

if (!EquipmentApi.isEquipped(ItemID.DRAGON_SCIMITAR)) {
InteractionResult result = EquipmentActions.equip("Dragon scimitar");
if (result.failed()) {
log.debug("Equip failed: {}", result.getMessage());
}
}

Null inputs return TARGET_NULL without touching the client. All write methods go through WidgetActions.interact() and are subject to ActionPacer; retry a PACED result from a later tick.