public class Item extends java.lang.Object implements Identifiable, Interactable
Modifier and Type | Field and Description |
---|---|
static int |
TEMPLATE_ID |
Constructor and Description |
---|
Item(MethodProvider methods,
int rootId,
int id,
int amount)
Deprecated.
for internal use only.
|
Item(RS2Widget owner,
int id,
int amount)
Deprecated.
for internal use only.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.String[] |
getActions()
Gets the model actions of this identifiable.
|
int |
getAmount()
Gets the amount for this item.
|
ItemDefinition |
getDefinition()
Gets the item definition for this item.
|
int |
getId()
Gets the id of this identifiable.
|
int[] |
getModelIds()
Gets the model ids of this identifiable.
|
java.lang.String |
getName()
This will return the name of the item.
|
int |
getNotedId() |
RS2Widget |
getOwner()
Gets the owner
RS2Widget of this item |
int |
getUnnotedId() |
boolean |
hasAction(java.lang.String... action)
Check if identifiable contains one or more of specified actions.
|
boolean |
hover()
Attempts to hover the mouse over the next click needed to interact with this
Interactable . |
boolean |
idContains(int... ids) |
boolean |
interact(java.lang.String... actions)
Executes an @link org.osbot.rs07.event.InteractionEvent which attempts to interact with
this
Interactable with the specified actions (if any). |
boolean |
isNote()
Whether this item is a note or not.
|
boolean |
nameContains(java.lang.String... names) |
java.lang.String |
toString() |
public static final int TEMPLATE_ID
public Item(RS2Widget owner, int id, int amount)
public Item(MethodProvider methods, int rootId, int id, int amount)
public RS2Widget getOwner()
RS2Widget
of this itemRS2Widget
of this itempublic java.lang.String toString()
toString
in class java.lang.Object
public int getId()
getId
in interface Identifiable
public int getAmount()
public java.lang.String getName()
getName
in interface Identifiable
public boolean nameContains(java.lang.String... names)
names
- The array of names to compare against.public boolean idContains(int... ids)
ids
- The array of ids to compare against.public int[] getModelIds()
getModelIds
in interface Identifiable
public boolean isNote()
public int getUnnotedId()
public int getNotedId()
public ItemDefinition getDefinition()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public boolean interact(java.lang.String... actions)
Interactable
with the specified actions (if any).interact
in interface Interactable
actions
- The actions to chose from the menu while hovering over this Interactable
.public boolean hover()
Interactable
.
This method will never click the mouse, so it can be used to speed up scripts while they are idling.hover
in interface Interactable
public boolean hasAction(java.lang.String... action)
hasAction
in interface Identifiable
action
- The actions you wish to check.public java.lang.String[] getActions()
getActions
in interface Identifiable