Class Item
- java.lang.Object
-
- net.eternalclient.api.wrappers.item.Item
-
- All Implemented Interfaces:
Identifiable
public class Item extends java.lang.Object implements Identifiable
This class represents an item and provides various methods to interact with it, such as getting the item ID, amount, actions, and checking if it is stackable, tradeable, or bankable.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
Item.State
-
Constructor Summary
Constructors Constructor Description Item(int id)
Item(int id, int amount)
Item(int id, int amount, int slot)
Item(int id, int amount, int[] widgetIDs)
Item(int id, int amount, int[] widgetIDs, int slot)
Item(int id, int amount, WidgetChild widgetChild)
Item(int id, int amount, WidgetChild widgetChild, int slot)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
containsAction(java.lang.String... actions)
boolean
equals(java.lang.Object otherItem)
java.lang.String[]
getActions()
int
getAmount()
java.awt.Rectangle
getBounds()
Returns the bounds of the item in its current container, null if it doesn't exist.java.lang.String
getColoredName()
ItemComposite
getComposition()
java.lang.String[]
getGroundItemActions()
int
getHAPrice()
int
getHighItemPrice()
int
getID()
int
getItemPrice()
int
getLAPrice()
int
getLowItemPrice()
int
getModelID()
java.lang.String
getName()
int
getNotedItemID()
java.awt.Point
getRandomPoint()
Returns gaussian random point within its bounds of the item in its current container, null if it doesn't exist.int
getSlot()
AsyncBufferedImage
getSprite()
EntityType
getType()
int
getUnnotedItemID()
int
getValue()
WidgetChild
getWidgetChild()
boolean
hasAction(java.lang.String... actions)
boolean
hasAction(java.util.function.Predicate<java.lang.String> predicate)
boolean
isBankable()
boolean
isMembers()
boolean
isNameAvailable()
boolean
isNoted()
boolean
isPlaceholder()
boolean
isStackable()
boolean
isTradable()
void
setSlot(int slot)
java.lang.String
toString()
void
updateItem(int id, int amount)
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.eternalclient.api.interfaces.Identifiable
containsName, hasID, hasName
-
-
-
-
Constructor Detail
-
Item
public Item(int id, int amount, int[] widgetIDs, int slot)
-
Item
public Item(int id, int amount, int[] widgetIDs)
-
Item
public Item(int id, int amount, WidgetChild widgetChild, int slot)
-
Item
public Item(int id, int amount, WidgetChild widgetChild)
-
Item
public Item(int id, int amount, int slot)
-
Item
public Item(int id, int amount)
-
Item
public Item(int id)
-
-
Method Detail
-
getSlot
public int getSlot()
-
setSlot
public void setSlot(int slot)
-
getComposition
public ItemComposite getComposition()
-
updateItem
public void updateItem(int id, int amount)
-
getID
public int getID()
- Specified by:
getID
in interfaceIdentifiable
-
getNotedItemID
public int getNotedItemID()
-
getUnnotedItemID
public int getUnnotedItemID()
-
getAmount
public int getAmount()
-
isNoted
public boolean isNoted()
-
isPlaceholder
public boolean isPlaceholder()
-
getActions
public java.lang.String[] getActions()
-
hasAction
public boolean hasAction(java.lang.String... actions)
-
hasAction
public boolean hasAction(java.util.function.Predicate<java.lang.String> predicate)
-
containsAction
public boolean containsAction(java.lang.String... actions)
-
getGroundItemActions
public java.lang.String[] getGroundItemActions()
-
getWidgetChild
public WidgetChild getWidgetChild()
-
getBounds
public java.awt.Rectangle getBounds()
Returns the bounds of the item in its current container, null if it doesn't exist.- Returns:
- the bounds of the item, null if it doesn't exist.
-
getRandomPoint
public java.awt.Point getRandomPoint()
Returns gaussian random point within its bounds of the item in its current container, null if it doesn't exist.- Returns:
- gaussian random point within its bounds of the item in its current container, null if it doesn't exist.
-
getName
public java.lang.String getName()
- Specified by:
getName
in interfaceIdentifiable
-
getColoredName
public java.lang.String getColoredName()
- Specified by:
getColoredName
in interfaceIdentifiable
-
isNameAvailable
public boolean isNameAvailable()
-
getType
public EntityType getType()
- Specified by:
getType
in interfaceIdentifiable
-
isStackable
public boolean isStackable()
-
isMembers
public boolean isMembers()
-
isBankable
public boolean isBankable()
-
isTradable
public boolean isTradable()
-
getValue
public int getValue()
-
getHAPrice
public int getHAPrice()
-
getLAPrice
public int getLAPrice()
-
getItemPrice
public int getItemPrice()
-
getHighItemPrice
public int getHighItemPrice()
-
getLowItemPrice
public int getLowItemPrice()
-
getModelID
public int getModelID()
-
getSprite
public AsyncBufferedImage getSprite()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object otherItem)
- Overrides:
equals
in classjava.lang.Object
-
-