Equipment Actions & API
revision-sensitive RuneLite UI, packet, or in-game outcomes; treat those as live-client verification pending unless the page records direct evidence.
EquipmentActions provides high-level, result-aware action dispatches for wearing and removing gear. Equipment handles passive queries about the player's equipped items.
EquipmentActions API
All write methods on EquipmentActions return InteractionResult and queue through ActionPacer. A paced result (InteractionStatus.PACED) instructs the caller to retry on a subsequent tick.
Core Methods
| Method | Description |
|---|---|
equip(String name) | Wields/wears the first inventory item matching the given name. Maps wear actions dynamically (e.g. "Wear", "Wield", "Equip"). |
unequip(EquipmentInventorySlot slot) | Removes the item in the specified equipment slot. |
unequip(String name) | Removes the equipped item matching the exact name. |
isEquipped(String name) | Helper query to check if the player wears an item with the matching name. |
getEquipped(EquipmentInventorySlot slot) | Returns an Optional<EquippedItem> representing the item in the given slot. |
equip requires the Inventory tab to be visible. Both unequip overloads require the Equipment tab to be visible. A closed prerequisite returns WIDGET_HIDDEN targeting the required tab; these requested actions never open or select a tab.
Equipment Query Mappings
For granular queries, use com.n3plugins.sdk.query.Equipment (or com.n3plugins.sdk.query.EquipmentItemQuery).
Slots (EquipmentInventorySlot)
Standard RuneLite slots operate fully:
AMMOBODYCAPECHESTFEETHANDSHEADLEGSNECKRINGSHIELDWEAPON
Developer Example
The following snippet demonstrates checking for a weapon and swapping gear safely inside a tick loop:
import com.n3plugins.Api.actions.EquipmentActions;
import com.n3plugins.Api.common.InteractionResult;
import com.n3plugins.Api.common.InteractionStatus;
import net.runelite.api.EquipmentInventorySlot;
public void checkGearSetup() {
// Check if weapon is equipped
if (!EquipmentActions.isEquipped("Dragon scimitar")) {
// Queue equip action
InteractionResult result = EquipmentActions.equip("Dragon scimitar");
if (result.getStatus() == InteractionStatus.PACED) {
return; // Wait for next tick
}
if (result.failed()) {
log.error("Unable to equip Dragon scimitar: {}", result.getMessage());
}
}
}
Check if the item sits equipped before calling equip(...) to prevent duplicate and redundant widget interactions.