Package org.geysermc.geyser.text
Record Class TextDecoration
java.lang.Object
java.lang.Record
org.geysermc.geyser.text.TextDecoration
- All Implemented Interfaces:
org.geysermc.mcprotocollib.protocol.data.game.chat.ChatTypeDecoration
public record TextDecoration(String translationKey, List<org.geysermc.mcprotocollib.protocol.data.game.chat.ChatTypeDecoration.Parameter> parameters, net.kyori.adventure.text.format.Style deserializedStyle)
extends Record
implements org.geysermc.mcprotocollib.protocol.data.game.chat.ChatTypeDecoration
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.geysermc.mcprotocollib.protocol.data.game.chat.ChatTypeDecoration
org.geysermc.mcprotocollib.protocol.data.game.chat.ChatTypeDecoration.Parameter -
Constructor Summary
ConstructorsConstructorDescriptionTextDecoration(String translationKey, List<org.geysermc.mcprotocollib.protocol.data.game.chat.ChatTypeDecoration.Parameter> parameters, net.kyori.adventure.text.format.Style deserializedStyle) Creates an instance of aTextDecorationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionnet.kyori.adventure.text.format.StyleReturns the value of thedeserializedStylerecord component.final booleanIndicates whether some other object is "equal to" this one.static net.kyori.adventure.text.format.StylegetStyle(org.geysermc.mcprotocollib.protocol.data.game.chat.ChatTypeDecoration decoration) final inthashCode()Returns a hash code value for this object.List<org.geysermc.mcprotocollib.protocol.data.game.chat.ChatTypeDecoration.Parameter>Returns the value of theparametersrecord component.static org.geysermc.mcprotocollib.protocol.data.game.chat.ChatTypereadChatType(RegistryEntryContext context) org.cloudburstmc.nbt.NbtMapstyle()final StringtoString()Returns a string representation of this record class.Returns the value of thetranslationKeyrecord component.
-
Constructor Details
-
TextDecoration
public TextDecoration(String translationKey, List<org.geysermc.mcprotocollib.protocol.data.game.chat.ChatTypeDecoration.Parameter> parameters, net.kyori.adventure.text.format.Style deserializedStyle) Creates an instance of aTextDecorationrecord class.- Parameters:
translationKey- the value for thetranslationKeyrecord componentparameters- the value for theparametersrecord componentdeserializedStyle- the value for thedeserializedStylerecord component
-
-
Method Details
-
style
public org.cloudburstmc.nbt.NbtMap style()- Specified by:
stylein interfaceorg.geysermc.mcprotocollib.protocol.data.game.chat.ChatTypeDecoration
-
readChatType
public static org.geysermc.mcprotocollib.protocol.data.game.chat.ChatType readChatType(RegistryEntryContext context) -
getStyle
public static net.kyori.adventure.text.format.Style getStyle(org.geysermc.mcprotocollib.protocol.data.game.chat.ChatTypeDecoration decoration) -
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). -
translationKey
Returns the value of thetranslationKeyrecord component.- Specified by:
translationKeyin interfaceorg.geysermc.mcprotocollib.protocol.data.game.chat.ChatTypeDecoration- Returns:
- the value of the
translationKeyrecord component
-
parameters
public List<org.geysermc.mcprotocollib.protocol.data.game.chat.ChatTypeDecoration.Parameter> parameters()Returns the value of theparametersrecord component.- Specified by:
parametersin interfaceorg.geysermc.mcprotocollib.protocol.data.game.chat.ChatTypeDecoration- Returns:
- the value of the
parametersrecord component
-
deserializedStyle
public net.kyori.adventure.text.format.Style deserializedStyle()Returns the value of thedeserializedStylerecord component.- Returns:
- the value of the
deserializedStylerecord component
-