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
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionactions()Returns the value of theactionsrecord component.static GuiItemempty()final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.org.bukkit.inventory.ItemStackitem()Returns the value of theitemrecord component.final StringtoString()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 theitemrecord component.- Returns:
- the value of the
itemrecord component
-
actions
Returns the value of theactionsrecord component.- Returns:
- the value of the
actionsrecord component
-