Package com.coderyo.coderyogui
Record Class GUIItem
java.lang.Object
java.lang.Record
com.coderyo.coderyogui.GUIItem
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionactions()Returns the value of theactionsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.lore()Returns the value of thelorerecord component.material()Returns the value of thematerialrecord component.name()Returns the value of thenamerecord component.booleantakeable()Returns the value of thetakeablerecord component.org.bukkit.inventory.ItemStackfinal StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
GUIItem
public GUIItem(String material, String name, List<String> lore, boolean takeable, List<GUIAction> actions) Creates an instance of aGUIItemrecord class.- Parameters:
material- the value for thematerialrecord componentname- the value for thenamerecord componentlore- the value for thelorerecord componenttakeable- the value for thetakeablerecord componentactions- the value for theactionsrecord component
-
-
Method Details
-
toItemStack
public org.bukkit.inventory.ItemStack toItemStack() -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
material
Returns the value of thematerialrecord component.- Returns:
- the value of the
materialrecord component
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
lore
Returns the value of thelorerecord component.- Returns:
- the value of the
lorerecord component
-
takeable
public boolean takeable()Returns the value of thetakeablerecord component.- Returns:
- the value of the
takeablerecord component
-
actions
Returns the value of theactionsrecord component.- Returns:
- the value of the
actionsrecord component
-