Package com.enhancedechest.gui.dialog
Record Class IconCatalog.Entry
java.lang.Object
java.lang.Record
com.enhancedechest.gui.dialog.IconCatalog.Entry
- Enclosing class:
IconCatalog
public static record IconCatalog.Entry(org.bukkit.Material material, String key, String displayName, String lowerName, net.kyori.adventure.text.Component sprite, net.kyori.adventure.text.Component name)
extends Record
One pickable icon: a material with its precomputed display name, reusable sprite component, and
a translatable name component.
displayName/lowerName are a server-derived English
name used only for search matching (the server can't know what text a translation key resolves to
client-side); name is what's actually shown to the player — a Component.translatable
that the Minecraft client resolves using its own language file, so it renders in the viewer's
client-side language exactly like the item's name in an inventory tooltip.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedisplayNamerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.key()Returns the value of thekeyrecord component.Returns the value of thelowerNamerecord component.org.bukkit.Materialmaterial()Returns the value of thematerialrecord component.net.kyori.adventure.text.Componentname()Returns the value of thenamerecord component.net.kyori.adventure.text.Componentsprite()Returns the value of thespriterecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Entry
public Entry(org.bukkit.Material material, String key, String displayName, String lowerName, net.kyori.adventure.text.Component sprite, net.kyori.adventure.text.Component name) Creates an instance of aEntryrecord class.- Parameters:
material- the value for thematerialrecord componentkey- the value for thekeyrecord componentdisplayName- the value for thedisplayNamerecord componentlowerName- the value for thelowerNamerecord componentsprite- the value for thespriterecord componentname- the value for thenamerecord component
-
-
Method Details
-
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). -
material
public org.bukkit.Material material()Returns the value of thematerialrecord component.- Returns:
- the value of the
materialrecord component
-
key
Returns the value of thekeyrecord component.- Returns:
- the value of the
keyrecord component
-
displayName
Returns the value of thedisplayNamerecord component.- Returns:
- the value of the
displayNamerecord component
-
lowerName
Returns the value of thelowerNamerecord component.- Returns:
- the value of the
lowerNamerecord component
-
sprite
public net.kyori.adventure.text.Component sprite()Returns the value of thespriterecord component.- Returns:
- the value of the
spriterecord component
-
name
public net.kyori.adventure.text.Component name()Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-