Package dev.triumphteam.gui.guis
Class StorageGui
java.lang.Object
dev.triumphteam.gui.guis.BaseGui
dev.triumphteam.gui.guis.StorageGui
- All Implemented Interfaces:
org.bukkit.inventory.InventoryHolder
GUI that does not clear its items once it's closed
-
Constructor Summary
ConstructorsConstructorDescriptionStorageGui(int rows, @NotNull String title) Deprecated.StorageGui(int rows, @NotNull String title, @NotNull Set<InteractionModifier> interactionModifiers) Main constructor for the StorageGuiStorageGui(@NotNull String title) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionAddsItemStackto the inventory straight, not the GUIaddItem(@NotNull org.bukkit.inventory.ItemStack... items) AddsItemStackto the inventory straight, not the GUIvoidopen(@NotNull org.bukkit.entity.HumanEntity player) OverriddenBaseGui.open(HumanEntity)to preventMethods inherited from class dev.triumphteam.gui.guis.BaseGui
addItem, addItem, addSlotAction, addSlotAction, allInteractionsDisabled, allowsOtherActions, canDropItems, canPlaceItems, canSwapItems, canTakeItems, close, close, disableAllInteractions, disableItemDrop, disableItemPlace, disableItemSwap, disableItemTake, disableOtherActions, enableAllInteractions, enableItemDrop, enableItemPlace, enableItemSwap, enableItemTake, enableOtherActions, getFiller, getGuiItem, getGuiItems, getInventory, getRows, getTitle, guiType, isUpdating, removeItem, removeItem, removeItem, removeItem, setCloseGuiAction, setDefaultClickAction, setDefaultTopClickAction, setDragAction, setInventory, setItem, setItem, setItem, setOpenGuiAction, setOutsideClickAction, setPlayerInventoryAction, setUpdating, title, update, updateItem, updateItem, updateItem, updateItem, updateTitle
-
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 havetitle- The GUI's title usingStringinteractionModifiers- A set containing theInteractionModifierthis GUI should use- Since:
- 3.0.3
-
StorageGui
Deprecated.Main constructor of the Persistent GUI- Parameters:
rows- The rows the GUI should havetitle- The GUI's title
-
StorageGui
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) AddsItemStackto the inventory straight, not the GUI- Parameters:
items- Varargs withItemStacks- Returns:
- An immutable
Mapwith the left overs
-
addItem
public Map<@NotNull Integer,@NotNull org.bukkit.inventory.ItemStack> addItem(@NotNull @NotNull List<org.bukkit.inventory.ItemStack> items) AddsItemStackto the inventory straight, not the GUI- Parameters:
items- Varargs withItemStacks- Returns:
- An immutable
Mapwith the left overs
-
open
public void open(@NotNull @NotNull org.bukkit.entity.HumanEntity player) OverriddenBaseGui.open(HumanEntity)to prevent
-