Class GroundItem
java.lang.Object
com.botwithus.bot.api.entities.GroundItem
- All Implemented Interfaces:
EntityContext
Rich wrapper around
GroundItemInfo with lazy ItemType
resolution and option-keyed interact.
Obtained through GroundItems.query() — don't construct
directly.
-
Method Summary
Modifier and TypeMethodDescriptiongetType()inthandle()booleanvoidinteract(int optionIndex) Queue an action by 1-based right-click option index.booleanQueue an action by option text.intitemId()name()intplane()Plane / height level (0-3).intquantity()raw()inttileX()Absolute world tile X.inttileY()Absolute world tile Y.toString()Methods inherited from interface EntityContext
distanceTo, distanceTo
-
Method Details
-
raw
-
handle
public int handle() -
itemId
public int itemId() -
quantity
public int quantity() -
name
-
tileX
public int tileX()Description copied from interface:EntityContextAbsolute world tile X.- Specified by:
tileXin interfaceEntityContext
-
tileY
public int tileY()Description copied from interface:EntityContextAbsolute world tile Y.- Specified by:
tileYin interfaceEntityContext
-
plane
public int plane()Description copied from interface:EntityContextPlane / height level (0-3).- Specified by:
planein interfaceEntityContext
-
getType
-
getOptions
-
hasOption
-
interact
public void interact(int optionIndex) Queue an action by 1-based right-click option index.- Throws:
IllegalArgumentException- foroptionIndexoutside [1, 6]
-
interact
Queue an action by option text. False if option isn't on the menu. -
toString
-