Package com.kraken.api.query.equipment
Class EquipmentQuery
- java.lang.Object
-
- com.kraken.api.core.AbstractQuery<EquipmentEntity,EquipmentQuery,ContainerItem>
-
- com.kraken.api.query.equipment.EquipmentQuery
-
public class EquipmentQuery extends AbstractQuery<EquipmentEntity,EquipmentQuery,ContainerItem>
-
-
Field Summary
-
Fields inherited from class com.kraken.api.core.AbstractQuery
ctx
-
-
Constructor Summary
Constructors Constructor Description EquipmentQuery(Context ctx)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EquipmentQueryall()Configures the query to look at both equipped items and wearable items in the inventory.EquipmentQueryinInterface()Configures the query to only look for items currently equipped on the player (read from the Equipment interface widgets).EquipmentQueryinInventory()Configures the query to only look for wearable/wieldable items currently inside the player's inventory.EquipmentEntityinSlot(net.runelite.api.EquipmentInventorySlot slot)Returns the interactable equipment entity for a given equipment slot.booleanisWearing(int id)Checks if the player is wearing an item by id.booleanisWearing(java.lang.String name)Checks if the player is wearing an item by name.protected java.util.function.Supplier<java.util.stream.Stream<EquipmentEntity>>source()EquipmentQuerywithId(int id)Filters for equipment with a specific item id.
-
-
-
Constructor Detail
-
EquipmentQuery
public EquipmentQuery(Context ctx)
-
-
Method Detail
-
inInventory
public EquipmentQuery inInventory()
Configures the query to only look for wearable/wieldable items currently inside the player's inventory.- Returns:
- EquipmentQuery
-
inInterface
public EquipmentQuery inInterface()
Configures the query to only look for items currently equipped on the player (read from the Equipment interface widgets).- Returns:
- EquipmentQuery
-
all
public EquipmentQuery all()
Configures the query to look at both equipped items and wearable items in the inventory.- Returns:
- EquipmentQuery
-
source
protected java.util.function.Supplier<java.util.stream.Stream<EquipmentEntity>> source()
- Specified by:
sourcein classAbstractQuery<EquipmentEntity,EquipmentQuery,ContainerItem>
-
withId
public EquipmentQuery withId(int id)
Filters for equipment with a specific item id.- Overrides:
withIdin classAbstractQuery<EquipmentEntity,EquipmentQuery,ContainerItem>- Parameters:
id- Item id to filter for- Returns:
- EquipmentQuery
-
isWearing
public boolean isWearing(int id)
Checks if the player is wearing an item by id. Note: This strictly checks the equipment slots, ignoring the "inInventory" setting.- Parameters:
id- The item id for the equipment to check- Returns:
- True if the player is wearing the equipment and false otherwise
-
isWearing
public boolean isWearing(java.lang.String name)
Checks if the player is wearing an item by name. Note: This strictly checks the equipment slots, ignoring the "inInventory" setting.- Parameters:
name- The name of the equipment to check- Returns:
- True if the player is wearing the equipment and false otherwise
-
inSlot
public EquipmentEntity inSlot(net.runelite.api.EquipmentInventorySlot slot)
Returns the interactable equipment entity for a given equipment slot.- Parameters:
slot- TheEquipmentInventorySlotto retrieve.- Returns:
- EquipmentEntity
-
-