Class 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.
    • 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)
      • updateItem

        public void updateItem​(int id,
                               int amount)
      • 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()
      • 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:
        getName in interface Identifiable
      • isNameAvailable

        public boolean isNameAvailable()
      • 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()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object otherItem)
        Overrides:
        equals in class java.lang.Object