Package dev.crafty.core.gui
Record Class GuiItem
java.lang.Object
java.lang.Record
dev.crafty.core.gui.GuiItem
- Record Components:
item
- The item to displayactions
- The actions to run when clicked
public record GuiItem(org.bukkit.inventory.ItemStack item, List<Consumer<org.bukkit.event.inventory.InventoryClickEvent>> actions)
extends Record
Item that has click action for the gui
- Since:
- 1.0.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionactions()
Returns the value of theactions
record component.static GuiItem
empty()
final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.org.bukkit.inventory.ItemStack
item()
Returns the value of theitem
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
Method Details
-
empty
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object)
. -
item
public org.bukkit.inventory.ItemStack item()Returns the value of theitem
record component.- Returns:
- the value of the
item
record component
-
actions
Returns the value of theactions
record component.- Returns:
- the value of the
actions
record component
-