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 classItem.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 booleancontainsAction(java.lang.String... actions)booleanequals(java.lang.Object otherItem)java.lang.String[]getActions()intgetAmount()java.awt.RectanglegetBounds()Returns the bounds of the item in its current container, null if it doesn't exist.java.lang.StringgetColoredName()ItemCompositegetComposition()java.lang.String[]getGroundItemActions()intgetHAPrice()intgetHighItemPrice()intgetID()intgetItemPrice()intgetLAPrice()intgetLowItemPrice()intgetModelID()java.lang.StringgetName()intgetNotedItemID()java.awt.PointgetRandomPoint()Returns gaussian random point within its bounds of the item in its current container, null if it doesn't exist.intgetSlot()AsyncBufferedImagegetSprite()EntityTypegetType()intgetUnnotedItemID()intgetValue()WidgetChildgetWidgetChild()booleanhasAction(java.lang.String... actions)booleanhasAction(java.util.function.Predicate<java.lang.String> predicate)booleanisBankable()booleanisMembers()booleanisNameAvailable()booleanisNoted()booleanisPlaceholder()booleanisStackable()booleanisTradable()voidsetSlot(int slot)java.lang.StringtoString()voidupdateItem(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:
getIDin 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:
getNamein interfaceIdentifiable
-
getColoredName
public java.lang.String getColoredName()
- Specified by:
getColoredNamein interfaceIdentifiable
-
isNameAvailable
public boolean isNameAvailable()
-
getType
public EntityType getType()
- Specified by:
getTypein 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:
toStringin classjava.lang.Object
-
equals
public boolean equals(java.lang.Object otherItem)
- Overrides:
equalsin classjava.lang.Object
-
-