Package de.marcely.bedwars.tools.gui
Class GUIItem
java.lang.Object
de.marcely.bedwars.tools.gui.GUIItem
- All Implemented Interfaces:
Cloneable
Represents an interactable item that can be added to a
GUI
-
Constructor Summary
ConstructorDescriptionGUIItem
(ItemStack is, ClickListener listener) GUIItem
(ItemStack is, ClickListener listener, @Nullable Object attachement) -
Method Summary
Modifier and TypeMethodDescriptionclone()
@Nullable Object
Get an optional attachement to this item.getItem()
Get the item that will be displayed in the inventory.Get the click listener of this item.void
setAttachement
(@Nullable Object attachement) Set the optional attachement of this item.
-
Constructor Details
-
GUIItem
-
GUIItem
-
-
Method Details
-
getItem
Get the item that will be displayed in the inventory.- Returns:
- The item that this GUIItem wrap around
-
getListener
Get the click listener of this item.- Returns:
- The click listener
-
getAttachement
Get an optional attachement to this item.May hold additional useful information depending on the context.
- Returns:
- The optional attachement (maybe
null
)
-
setAttachement
Set the optional attachement of this item.May hold additional useful information depending on the context.
- Parameters:
attachement
- The optional attachement (maybenull
)
-
clone
-