Record Class GliderDefinition
java.lang.Object
java.lang.Record
dev.itsharshxd.zentrix.api.glider.GliderDefinition
- Record Components:
id- the stable ID cosmetics ownership is stored undername- the display name, in Zentrix's colour formatlore- the description lines, in Zentrix's colour formatpermission- the permission granted to players who own it, or null for noneitem- the item worn on the player's back while gliding, as resolved now; a copy
public record GliderDefinition(@NotNull String id, @NotNull String name, @NotNull List<String> lore, @Nullable String permission, @NotNull org.bukkit.inventory.ItemStack item)
extends Record
One glider of the catalog in
content/cosmetics/gliders.yml. A snapshot: later edits in
the glider editor do not change it.- Since:
- 1.8.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.The permission granted to owners, when there is one.final inthashCode()Returns a hash code value for this object.@NotNull Stringid()Returns the value of theidrecord component.@NotNull org.bukkit.inventory.ItemStackitem()A copy of the item worn on the player's back.lore()Returns the value of thelorerecord component.@NotNull Stringname()Returns the value of thenamerecord component.@Nullable StringReturns the value of thepermissionrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
GliderDefinition
public GliderDefinition(@NotNull @NotNull String id, @NotNull @NotNull String name, @NotNull @NotNull List<String> lore, @Nullable @Nullable String permission, @NotNull @NotNull org.bukkit.inventory.ItemStack item) Creates an instance of aGliderDefinitionrecord class.- Parameters:
id- the value for theidrecord componentname- the value for thenamerecord componentlore- the value for thelorerecord componentpermission- the value for thepermissionrecord componentitem- the value for theitemrecord component
-
-
Method Details
-
getPermission
The permission granted to owners, when there is one. -
item
@NotNull public @NotNull org.bukkit.inventory.ItemStack item()A copy of the item worn on the player's back. -
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). -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord 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
-
permission
Returns the value of thepermissionrecord component.- Returns:
- the value of the
permissionrecord component
-