Class ItemContainerSnapshot.Item
java.lang.Object
privbot.hooks.container.ItemContainerSnapshot.Item
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
id
public final int idItem id, slot index and stack quantity. -
slot
public final int slotItem id, slot index and stack quantity. -
quantity
public final int quantityItem id, slot index and stack quantity. -
name
The item's name as the player sees it ("" when unknown).
-
-
Constructor Details
-
Item
- Parameters:
id- item id, positivename- item name (null: "")slot- slot index, non-negativequantity- stack quantity, positiveactions- the item's menu actions (blanks dropped)- Throws:
IllegalArgumentException- for a non-positive id or quantity, or a negative slot
-
-
Method Details
-
actions
-
hasAction
- Parameters:
wanted- a menu action, case-insensitive- Returns:
- whether the item lists it
-
nameMatches
A name saved before colour codes were stripped ("@gre@Coins") still matches "Coins". -
nameContains
- Parameters:
wanted- a name fragment (colour codes ignored), case-insensitive- Returns:
- whether the name contains it; false for blank
-
toString
-