Package com.kraken.api.query.equipment
Class EquipmentEntity
- java.lang.Object
-
- com.kraken.api.core.AbstractEntity<ContainerItem>
-
- com.kraken.api.query.equipment.EquipmentEntity
-
- All Implemented Interfaces:
Interactable<ContainerItem>
public class EquipmentEntity extends AbstractEntity<ContainerItem>
-
-
Field Summary
-
Fields inherited from class com.kraken.api.core.AbstractEntity
ctx, raw
-
-
Constructor Summary
Constructors Constructor Description EquipmentEntity(Context ctx, ContainerItem raw)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetId()The item ID for the wrapped game entityjava.lang.StringgetName()The game entities name.booleaninteract(java.lang.String action)Interacts with the entity using the given action verb.booleanremove()Removes an equipped weapon or piece of armour.booleanwear()Wears an equippable itembooleanwield()Wields a weapon.-
Methods inherited from class com.kraken.api.core.AbstractEntity
equals, hashCode, isNull, raw
-
-
-
-
Constructor Detail
-
EquipmentEntity
public EquipmentEntity(Context ctx, ContainerItem raw)
-
-
Method Detail
-
getName
public java.lang.String getName()
Description copied from interface:InteractableThe game entities name.- Returns:
- The name of the game entity i.e. NPC name for NPC's, item name for ContainerItem's, and GameObject name for various game objects.
-
interact
public boolean interact(java.lang.String action)
Description copied from interface:InteractableInteracts with the entity using the given action verb.- Parameters:
action- The menu action to trigger (e.g., "Attack", "Talk-to", "Take")- Returns:
- true if the interaction packet was successfully queued/sent
-
getId
public int getId()
Description copied from interface:InteractableThe item ID for the wrapped game entity- Returns:
- int Item id
-
wear
public boolean wear()
Wears an equippable item- Returns:
- true if the item was equipped and false otherwise
-
wield
public boolean wield()
Wields a weapon.- Returns:
- True if the weapon was equipped and false otherwise
-
remove
public boolean remove()
Removes an equipped weapon or piece of armour.- Returns:
- True if the removal was successful and false otherwise.
-
-