java.lang.Object
de.placeblock.betterinventories.content.GUISection
de.placeblock.betterinventories.content.item.GUIItem
All Implemented Interfaces:
Sizeable
Direct Known Subclasses:
GUIButton

public class GUIItem extends GUISection
A GUISection with a size of 1x1 containing an ItemStack
Builder: GUIItemBuilder
  • Field Details

    • BUTTON_SIZE

      public static final Vector2d BUTTON_SIZE
      The Size of every GUIItem
    • itemStack

      protected org.bukkit.inventory.ItemStack itemStack
      The ItemStack to be rendered
  • Constructor Details

    • GUIItem

      public GUIItem(GUI gui, org.bukkit.inventory.ItemStack itemStack)
      Creates a new GUIItem
      Parameters:
      gui - The GUI
      itemStack - The ItemStack. ItemBuilder may help to create it.
  • Method Details

    • render

      public List<org.bukkit.inventory.ItemStack> render()
      Renders the GUIItem on a list
      Specified by:
      render in class GUISection
      Returns:
      The List
    • getSectionAt

      public GUISection getSectionAt(int slot)
      Returns the GUISection at a specific slot. For GUIItems it will always return the GUIItem itself.
      Overrides:
      getSectionAt in class GUISection
      Parameters:
      slot - The slot
      Returns:
      The GUISection
    • getSectionAt

      public GUISection getSectionAt(Vector2d position)
      Returns the GUISection at a specific position. For GUIItems it will always return the GUIItem itself.
      Specified by:
      getSectionAt in class GUISection
      Parameters:
      position - The position
      Returns:
      The GUISection