Package org.tribot.script.sdk.interfaces
Interface Item
-
- All Superinterfaces:
Actionable
,Clickable
,Identifiable
,Indexable
,ItemDefinable
,Named
,Stackable
- All Known Implementing Classes:
EquipmentItem
,InventoryItem
,WidgetItem
public interface Item extends Clickable, Named, Identifiable, Indexable, Stackable, ItemDefinable, Actionable
Represents an item, such as an inventory item.- See Also:
to find items
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default java.util.List<java.lang.String>
getActions()
Gets the available actions for the entity, usually dependent on their definition.java.util.Optional<java.awt.Rectangle>
getBounds()
Gets the bounds of the areadefault java.lang.String
getName()
Gets the name of the Item.default boolean
isHovering()
Checks if the mouse is currently over this entitydefault java.util.Optional<java.lang.Integer>
lookupPrice()
Looks up the price of the given itemId.-
Methods inherited from interface org.tribot.script.sdk.interfaces.Clickable
click, click, hover, hover, hoverMenu, isVisible
-
Methods inherited from interface org.tribot.script.sdk.interfaces.Identifiable
getId
-
Methods inherited from interface org.tribot.script.sdk.interfaces.ItemDefinable
getDefinition
-
-
-
-
Method Detail
-
getBounds
java.util.Optional<java.awt.Rectangle> getBounds()
Gets the bounds of the area- Returns:
- the bounds of the area
-
getName
default java.lang.String getName()
Gets the name of the Item.
-
lookupPrice
default java.util.Optional<java.lang.Integer> lookupPrice()
Looks up the price of the given itemId. Works on noted items.- Returns:
- The price of the item. If the item is not found or cannot be looked up, empty Optional.
-
getActions
default java.util.List<java.lang.String> getActions()
Gets the available actions for the entity, usually dependent on their definition. Note this will attempt to provide the actions for the specific item type. For example, if this is an equipment item it will provide the equipment actions. To always get the general actions see {@link this#getDefinition()}.- Specified by:
getActions
in interfaceActionable
- See Also:
ItemDefinition.getActions()
-
isHovering
default boolean isHovering()
Description copied from interface:Clickable
Checks if the mouse is currently over this entity- Specified by:
isHovering
in interfaceClickable
- Returns:
- true if the mouse if over this entity, false otherwise
-
-