Class Item

    • Constructor Detail

      • Item

        public Item​(int itemId,
                    int stack,
                    int slot)
      • Item

        public Item​(int itemId,
                    int stack)
    • Method Detail

      • getID

        public int getID()
        Description copied from interface: Identifiable
        Gets ID number of the given object.
        Specified by:
        getID in interface Identifiable
        Returns:
        the ID number as integer.
      • getAmount

        public int getAmount()
      • getLivePrice

        public int getLivePrice()
        This will get the average selling price on the GE, if available
        Returns:
        The current average price sold on the GE if found, otherwise 0
      • getSlot

        public int getSlot()
        For Inventory items only!
        Returns:
        Slot for inventory item.
      • isMembersOnly

        public boolean isMembersOnly()
      • isStackable

        public boolean isStackable()
      • getUnnotedItemID

        public int getUnnotedItemID()
      • getNotedItemID

        public int getNotedItemID()
      • isNoted

        public boolean isNoted()
      • isNotable

        public boolean isNotable()
      • isPlaceholder

        public boolean isPlaceholder()
      • getPlaceholderValue

        public int getPlaceholderValue()
      • getPlaceholderID

        public int getPlaceholderID()
      • getDiscardableValue

        public int getDiscardableValue()
      • getDiscardableID

        public int getDiscardableID()
      • getComposite

        public org.dreambot.internal.cache.wrappers.def.ItemDef getComposite()
      • getName

        public java.lang.String getName()
        Description copied from interface: Identifiable
        Gets the name of the given object.
        Specified by:
        getName in interface Identifiable
        Returns:
        the name as a string.
      • isValid

        public boolean isValid()
      • useOn

        public boolean useOn​(Entity entity)
        Uses this item on an entity
        Note: this item MUST be an inventory item for this method to work
        Parameters:
        entity - The entity you want to use this item on
        Returns:
        True if successful
      • useOn

        public boolean useOn​(Item item)
        Uses this item on another item
        Note: this item MUST be an inventory item for this method to work
        Parameters:
        item - The Item you want to use this item on
        Returns:
        True if successful
      • useOn

        public boolean useOn​(java.lang.String name)
        Uses this item on another item
        Note: this item MUST be an inventory item for this method to work
        Parameters:
        name - The Item name you want to use this item on
        Returns:
        True if successful
      • useOn

        public boolean useOn​(int id)
        Uses this item on another item
        Note: this item MUST be an inventory item for this method to work
        Parameters:
        id - The Item id you want to use this item on
        Returns:
        True if successful
      • useOn

        public boolean useOn​(Filter<Item> filter)
        Uses this item on another item
        Note: this item MUST be an inventory item for this method to work
        Parameters:
        filter - The Item filter you want to use this item on
        Returns:
        True if successful
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • interact

        public boolean interact()
        Interacts with the item
        Returns:
        True if successful
      • interact

        public boolean interact​(java.lang.String action)
        Interacts with the item using the specified action
        Parameters:
        action - The action to interact with
        Returns:
        True if successful
      • hasAction

        public boolean hasAction​(java.lang.String... actions)
      • isMembers

        public boolean isMembers()
      • getTeam

        public int getTeam()
      • getValue

        public int getValue()
      • getShiftClickIndex

        public int getShiftClickIndex()
      • isTradable

        public boolean isTradable()
      • getActions

        public java.lang.String[] getActions()
      • getLowAlchValue

        public int getLowAlchValue()
      • getHighAlchValue

        public int getHighAlchValue()