Package de.Keyle.MyPet.api.gui
Record Class ItemAppearance
java.lang.Object
java.lang.Record
de.Keyle.MyPet.api.gui.ItemAppearance
- Record Components:
material- the item to showtitle- display name, in MiniMessage formlore- lore lines, in MiniMessage formglow- whether to render the enchantment glintamount- stack size shown on the slot, at least 1customModelData- custom model data value, for resource packsheadSkin- which skin to apply when the material is a player headpotionColor- tint for a potion item, ornullfor the default
public record ItemAppearance(Material material, String title, List<String> lore, boolean glow, int amount, int customModelData, HeadSkin headSkin, @Nullable Color potionColor)
extends Record
Pure visual description of one item slot. Title and lore are MiniMessage strings,
pre-render; placeholders are applied with the active
PlaceholderCatalog.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintamount()Returns the value of theamountrecord component.intReturns the value of thecustomModelDatarecord component.final booleanIndicates whether some other object is "equal to" this one.booleanglow()Returns the value of theglowrecord component.final inthashCode()Returns a hash code value for this object.headSkin()Returns the value of theheadSkinrecord component.lore()Returns the value of thelorerecord component.material()Returns the value of thematerialrecord component.@Nullable ColorReturns the value of thepotionColorrecord component.title()Returns the value of thetitlerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
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. 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
-
title
Returns the value of thetitlerecord component.- Returns:
- the value of the
titlerecord component
-
lore
Returns the value of thelorerecord component.- Returns:
- the value of the
lorerecord component
-
glow
public boolean glow()Returns the value of theglowrecord component.- Returns:
- the value of the
glowrecord component
-
amount
public int amount()Returns the value of theamountrecord component.- Returns:
- the value of the
amountrecord component
-
customModelData
public int customModelData()Returns the value of thecustomModelDatarecord component.- Returns:
- the value of the
customModelDatarecord component
-
headSkin
Returns the value of theheadSkinrecord component.- Returns:
- the value of the
headSkinrecord component
-
potionColor
Returns the value of thepotionColorrecord component.- Returns:
- the value of the
potionColorrecord component
-