public final class GuiItem extends Object
ItemStack on the Inventory| Constructor and Description |
|---|
GuiItem(@NotNull org.bukkit.inventory.ItemStack itemStack)
Secondary constructor with no action
|
GuiItem(@NotNull org.bukkit.inventory.ItemStack itemStack,
GuiAction<org.bukkit.event.inventory.InventoryClickEvent> action)
Main constructor of the GuiItem
|
GuiItem(@NotNull org.bukkit.Material material)
|
GuiItem(@NotNull org.bukkit.Material material,
@Nullable GuiAction<org.bukkit.event.inventory.InventoryClickEvent> action)
Alternate constructor that takes
Material instead of an ItemStack |
| Modifier and Type | Method and Description |
|---|---|
org.bukkit.inventory.ItemStack |
getItemStack()
Gets the GuiItem's
ItemStack |
void |
setAction(GuiAction<org.bukkit.event.inventory.InventoryClickEvent> action)
Replaces the
GuiAction of the current GUI Item |
void |
setItemStack(@NotNull org.bukkit.inventory.ItemStack itemStack)
Replaces the
ItemStack of the GUI Item |
public GuiItem(@NotNull
@NotNull org.bukkit.inventory.ItemStack itemStack,
GuiAction<org.bukkit.event.inventory.InventoryClickEvent> action)
itemStack - The ItemStack to be usedaction - The GuiAction to run when clicking on the Itempublic GuiItem(@NotNull
@NotNull org.bukkit.inventory.ItemStack itemStack)
itemStack - The ItemStack to be usedpublic GuiItem(@NotNull
@NotNull org.bukkit.Material material)
material - The Material to be used when invoking classpublic GuiItem(@NotNull
@NotNull org.bukkit.Material material,
@Nullable
@Nullable GuiAction<org.bukkit.event.inventory.InventoryClickEvent> action)
Material instead of an ItemStackmaterial - The Material to be used when invoking classaction - The GuiAction should be passed on InventoryClickEventpublic void setItemStack(@NotNull
@NotNull org.bukkit.inventory.ItemStack itemStack)
ItemStack of the GUI ItemitemStack - The new ItemStackpublic void setAction(GuiAction<org.bukkit.event.inventory.InventoryClickEvent> action)
GuiAction of the current GUI Itemaction - The new GuiAction to setpublic org.bukkit.inventory.ItemStack getItemStack()
ItemStackItemStackCopyright © 2020. All rights reserved.