Class Item

java.lang.Object
net.botwithus.rs3.game.Item
All Implemented Interfaces:
Identifiable, Onymous

public final class Item extends Object implements Identifiable, Onymous
  • Constructor Details

    • Item

      public Item(int inventoryId, int slot, int id, int stackSize)
  • Method Details

    • getName

      @Nullable public @Nullable String getName()
      Specified by:
      getName in interface Onymous
    • getId

      public int getId()
      Specified by:
      getId in interface Identifiable
    • getStackSize

      public int getStackSize()
    • getSlot

      public int getSlot()
    • getConfigType

      @Nullable public @Nullable ItemType getConfigType()
    • getInventoryType

      @Nullable public @Nullable InventoryType getInventoryType()
      Gets the InventoryType of the inventory that this item is in.
      Returns:
      The InventoryType of the inventory that this item is in.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • getVarbitValue

      public int getVarbitValue(int varbitId)
      Retrieves the varbit value of an item in an inventory.
      Parameters:
      varbitId - The varbit ID.
      Returns:
      The varbit value of the item in the inventory, or -1 if the method handle could not be found.