public class GuiItem extends Object
| Constructor and Description |
|---|
GuiItem(org.bukkit.inventory.ItemStack item)
Creates a new gui item based on the item stack and action
|
GuiItem(org.bukkit.inventory.ItemStack item,
Consumer<org.bukkit.event.inventory.InventoryClickEvent> action)
Creates a new gui item based on the item stack and action
|
| Modifier and Type | Method and Description |
|---|---|
Consumer<org.bukkit.event.inventory.InventoryClickEvent> |
getAction()
Returns the action for this item
|
org.bukkit.inventory.ItemStack |
getItem()
Returns the item
|
boolean |
isVisible()
Returns whether or not this item is visible
|
void |
setVisible(boolean visible)
Sets the visibility of this item to the new visibility
|
public GuiItem(@NotNull
org.bukkit.inventory.ItemStack item,
@Nullable
Consumer<org.bukkit.event.inventory.InventoryClickEvent> action)
item - the item stackaction - the action called whenever an interaction with this item happenspublic GuiItem(@NotNull
org.bukkit.inventory.ItemStack item)
item - the item stack@Nullable @Contract(pure=true) public Consumer<org.bukkit.event.inventory.InventoryClickEvent> getAction()
@NotNull @Contract(pure=true) public org.bukkit.inventory.ItemStack getItem()
public boolean isVisible()
public void setVisible(boolean visible)
visible - the new visibilityCopyright © 2019. All rights reserved.