Package dev.triumphteam.gui.guis
Class GuiItem
java.lang.Object
dev.triumphteam.gui.guis.GuiItem
GuiItem represents the
ItemStack on the Inventory-
Constructor Summary
ConstructorsConstructorDescriptionGuiItem(@NotNull org.bukkit.Material material) GuiItem(@NotNull org.bukkit.Material material, @Nullable GuiAction<@NotNull org.bukkit.event.inventory.InventoryClickEvent> action) Alternate constructor that takesMaterialinstead of anItemStackGuiItem(@NotNull org.bukkit.inventory.ItemStack itemStack) Secondary constructor with no actionGuiItem(@NotNull org.bukkit.inventory.ItemStack itemStack, @Nullable GuiAction<@NotNull org.bukkit.event.inventory.InventoryClickEvent> action) Main constructor of the GuiItem -
Method Summary
Modifier and TypeMethodDescription@Nullable GuiAction<org.bukkit.event.inventory.InventoryClickEvent> Gets theGuiActionto do when the player clicks on it@NotNull org.bukkit.inventory.ItemStackGets the GuiItem'sItemStackvoidReplaces theGuiActionof the current GUI ItemvoidsetItemStack(@NotNull org.bukkit.inventory.ItemStack itemStack) Replaces theItemStackof the GUI Item
-
Constructor Details
-
GuiItem
public GuiItem(@NotNull @NotNull org.bukkit.inventory.ItemStack itemStack, @Nullable @Nullable GuiAction<@NotNull org.bukkit.event.inventory.InventoryClickEvent> action) Main constructor of the GuiItem- Parameters:
itemStack- TheItemStackto be usedaction- TheGuiActionto run when clicking on the Item
-
GuiItem
public GuiItem(@NotNull @NotNull org.bukkit.inventory.ItemStack itemStack) Secondary constructor with no action- Parameters:
itemStack- The ItemStack to be used
-
GuiItem
public GuiItem(@NotNull @NotNull org.bukkit.Material material) - Parameters:
material- TheMaterialto be used when invoking class
-
GuiItem
public GuiItem(@NotNull @NotNull org.bukkit.Material material, @Nullable @Nullable GuiAction<@NotNull org.bukkit.event.inventory.InventoryClickEvent> action) Alternate constructor that takesMaterialinstead of anItemStack- Parameters:
material- TheMaterialto be used when invoking classaction- TheGuiActionshould be passed onInventoryClickEvent
-
-
Method Details
-
getItemStack
@NotNull public @NotNull org.bukkit.inventory.ItemStack getItemStack()Gets the GuiItem'sItemStack- Returns:
- The
ItemStack
-
setItemStack
public void setItemStack(@NotNull @NotNull org.bukkit.inventory.ItemStack itemStack) Replaces theItemStackof the GUI Item- Parameters:
itemStack- The newItemStack
-
getAction
Gets theGuiActionto do when the player clicks on it -
setAction
public void setAction(@Nullable @Nullable GuiAction<@NotNull org.bukkit.event.inventory.InventoryClickEvent> action) Replaces theGuiActionof the current GUI Item- Parameters:
action- The newGuiActionto set
-