Class StorageGui

java.lang.Object
dev.triumphteam.gui.guis.BaseGui
dev.triumphteam.gui.guis.StorageGui
All Implemented Interfaces:
org.bukkit.inventory.InventoryHolder

public class StorageGui extends BaseGui
GUI that does not clear its items once it's closed
  • Constructor Details

    • StorageGui

      public StorageGui(int rows, @NotNull @NotNull String title, @NotNull @NotNull Set<InteractionModifier> interactionModifiers)
      Main constructor for the StorageGui
      Parameters:
      rows - The amount of rows the GUI should have
      title - The GUI's title using String
      interactionModifiers - A set containing the InteractionModifier this GUI should use
      Since:
      3.0.3
    • StorageGui

      @Deprecated public StorageGui(int rows, @NotNull @NotNull String title)
      Deprecated.
      Main constructor of the Persistent GUI
      Parameters:
      rows - The rows the GUI should have
      title - The GUI's title
    • StorageGui

      @Deprecated public StorageGui(@NotNull @NotNull String title)
      Deprecated.
      Alternative constructor that does not require rows
      Parameters:
      title - The GUI's title
  • Method Details

    • addItem

      @NotNull public @NotNull Map<@NotNull Integer,@NotNull org.bukkit.inventory.ItemStack> addItem(@NotNull @NotNull org.bukkit.inventory.ItemStack... items)
      Adds ItemStack to the inventory straight, not the GUI
      Parameters:
      items - Varargs with ItemStacks
      Returns:
      An immutable Map with the left overs
    • addItem

      public Map<@NotNull Integer,@NotNull org.bukkit.inventory.ItemStack> addItem(@NotNull @NotNull List<org.bukkit.inventory.ItemStack> items)
      Adds ItemStack to the inventory straight, not the GUI
      Parameters:
      items - Varargs with ItemStacks
      Returns:
      An immutable Map with the left overs
    • open

      public void open(@NotNull @NotNull org.bukkit.entity.HumanEntity player)
      Overridden BaseGui.open(HumanEntity) to prevent
      Overrides:
      open in class BaseGui
      Parameters:
      player - The HumanEntity to open the GUI to