Package net.jeqo.bloons.gui
Class GUIClickableItem
java.lang.Object
net.jeqo.bloons.gui.GUIClickableItem
A class that represents a clickable item in a GUI, both interactable and
non-interactable.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic HashMap
<String, GUIClickableItem> A map of all clickable items in the GUI -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Whether the item can be picked upGets the finalized item with the GUI NBT data attachedabstract NBTItem
getItem()
The item that is displayed in the GUIabstract int
getSlot()
The slot that the item is inabstract void
run
(org.bukkit.event.inventory.InventoryClickEvent event) What runs when the item is clicked
-
Field Details
-
itemData
A map of all clickable items in the GUI
-
-
Constructor Details
-
GUIClickableItem
public GUIClickableItem()Creates a new clickable item
-
-
Method Details
-
getFinalizedItem
Gets the finalized item with the GUI NBT data attached- Returns:
- The finalized item, type net.jeqo.bloons.utils.NBTItem
-
run
public abstract void run(org.bukkit.event.inventory.InventoryClickEvent event) What runs when the item is clicked- Parameters:
event
- The event that is fired when the item is clicked, type org.bukkit.event.inventory.InventoryClickEvent
-
getSlot
public abstract int getSlot()The slot that the item is in- Returns:
- The slot that the item is in, type int
-
getItem
The item that is displayed in the GUI- Returns:
- The item, type net.jeqo.bloons.utils.NBTItem
-
canPickup
public boolean canPickup()Whether the item can be picked up- Returns:
- Whether the item can be picked up, type boolean
-