Record Class BannerMeta.Pattern
java.lang.Object
java.lang.Record
net.minestom.server.item.metadata.BannerMeta.Pattern
- Enclosing class:
BannerMeta
public static record BannerMeta.Pattern(@NotNull DyeColor color, @NotNull BannerPattern pattern)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionPattern(@NotNull DyeColor color, @NotNull BannerPattern pattern) Creates an instance of aPatternrecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull org.jglrxavpok.hephaistos.nbt.NBTCompoundRetrieves theBannerMeta.Patternas anNBTCompound.@NotNull DyeColorcolor()Returns the value of thecolorrecord component.final booleanIndicates whether some other object is "equal to" this one.static @NotNull BannerMeta.PatternfromCompound(@NotNull org.jglrxavpok.hephaistos.nbt.NBTCompound compound) Retrieves a banner pattern from the givencompound.final inthashCode()Returns a hash code value for this object.@NotNull BannerPatternpattern()Returns the value of thepatternrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Pattern
Creates an instance of aPatternrecord class.- Parameters:
color- the value for thecolorrecord componentpattern- the value for thepatternrecord component
-
-
Method Details
-
fromCompound
@NotNull public static @NotNull BannerMeta.Pattern fromCompound(@NotNull @NotNull org.jglrxavpok.hephaistos.nbt.NBTCompound compound) Retrieves a banner pattern from the givencompound.- Parameters:
compound- The NBT connection, which should be a banner pattern.- Returns:
- A new created banner pattern.
-
asCompound
@NotNull public @NotNull org.jglrxavpok.hephaistos.nbt.NBTCompound asCompound()Retrieves theBannerMeta.Patternas anNBTCompound.- Returns:
- The banner pattern as a nbt compound.
-
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). -
color
Returns the value of thecolorrecord component.- Returns:
- the value of the
colorrecord component
-
pattern
Returns the value of thepatternrecord component.- Returns:
- the value of the
patternrecord component
-