All Implemented Interfaces:
Sizeable
Direct Known Subclasses:
SynchedGUIPane

public abstract class IOGUIPane extends SimpleItemGUIPane
GUIPane which allows Items to be inserted and taken out
  • Constructor Details

    • IOGUIPane

      public IOGUIPane(GUI gui, Vector2d size, boolean autoSize)
      Creates a new TransferGUIPane
      Parameters:
      gui - The GUI for the Pane
      size - The size of the Pane
      autoSize - Whether to automatically resize the pane according to the children. If true it will set the size to the bounding box of all children.
    • IOGUIPane

      public IOGUIPane(GUI gui, Vector2d minSize, Vector2d maxSize)
      Creates a new TransferGUIPane
      Parameters:
      gui - The GUI for the Pane
      minSize - The minimum size of the Pane
      maxSize - The maximum size of the Pane
    • IOGUIPane

      public IOGUIPane(GUI gui, Vector2d minSize, Vector2d maxSize, boolean autoSize)
      Creates a new TransferGUIPane
      Parameters:
      gui - The GUI
      minSize - The minimum size of the Pane
      maxSize - The maximum size of the Pane
      autoSize - Whether to automatically resize the pane according to the children. If true it will set the size to the bounding box of all children.
  • Method Details

    • onItemAdd

      public boolean onItemAdd(Vector2d position, org.bukkit.inventory.ItemStack itemStack)
      Description copied from class: GUISection
      Called when an item is added to an empty slot
      Overrides:
      onItemAdd in class GUIPane
      Parameters:
      position - The relative position of the slot
      itemStack - The itemstack that was added
      Returns:
      Whether this action is allowed.
    • onItemRemove

      public boolean onItemRemove(Vector2d position)
      Description copied from class: GUISection
      Called when an item is removed from an empty slot
      Overrides:
      onItemRemove in class GUIPane
      Parameters:
      position - The relative position of the slot
      Returns:
      Whether this action is allowed.
    • onItemAmount

      public boolean onItemAmount(Vector2d position, int amount)
      Description copied from class: GUISection
      Called when the amount of an item in a slot changes
      Overrides:
      onItemAmount in class GUIPane
      Parameters:
      position - The relative position of the slot
      amount - The new amount of the item
      Returns:
      Whether this action is allowed.
    • onItemProvide

      public void onItemProvide(org.bukkit.inventory.ItemStack itemStack)
      Description copied from class: GUIPane
      Called when an item is provided by an inventory MOVE_TO_OTHER_INVENTORY event
      Overrides:
      onItemProvide in class BaseSimpleGUIPane<GUIItem,SimpleItemGUIPane>
      Parameters:
      itemStack - The provided item. Method reduces the amount of the item by the number that got accepted.
    • onItemChange

      public abstract void onItemChange(Vector2d position)
      Called when an item changes
      Parameters:
      position - The position of the item that changed