Package net.minestom.server.message
Record Class ChatTypeDecoration
java.lang.Object
java.lang.Record
net.minestom.server.message.ChatTypeDecoration
public record ChatTypeDecoration(@NotNull String translationKey, @NotNull List<ChatTypeDecoration.Parameter> parameters, @NotNull Style style)
extends Record
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionChatTypeDecoration
(@NotNull String translationKey, @NotNull List<ChatTypeDecoration.Parameter> parameters, @NotNull Style style) Creates an instance of aChatTypeDecoration
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.@NotNull List
<ChatTypeDecoration.Parameter> Returns the value of theparameters
record component.@NotNull Style
style()
Returns the value of thestyle
record component.final String
toString()
Returns a string representation of this record class.@NotNull String
Returns the value of thetranslationKey
record component.
-
Field Details
-
NBT_TYPE
-
-
Constructor Details
-
ChatTypeDecoration
public ChatTypeDecoration(@NotNull @NotNull String translationKey, @NotNull @NotNull List<ChatTypeDecoration.Parameter> parameters, @NotNull @NotNull Style style) Creates an instance of aChatTypeDecoration
record class.- Parameters:
translationKey
- the value for thetranslationKey
record componentparameters
- the value for theparameters
record componentstyle
- the value for thestyle
record 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)
. -
translationKey
Returns the value of thetranslationKey
record component.- Returns:
- the value of the
translationKey
record component
-
parameters
Returns the value of theparameters
record component.- Returns:
- the value of the
parameters
record component
-
style
Returns the value of thestyle
record component.- Returns:
- the value of the
style
record component
-