Record Class Message
java.lang.Object
java.lang.Record
net.minecraft.server.jsonrpc.methods.Message
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<Message> The field for theliteralrecord component.The field for thetranslatablerecord component.The field for thetranslatableParamsrecord component. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.literal()Returns the value of theliteralrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thetranslatablerecord component.Returns the value of thetranslatableParamsrecord component.
-
Field Details
-
literal
-
translatable
-
translatableParams
-
CODEC
-
-
Constructor Details
-
Message
public Message(Optional<String> literal, Optional<String> translatable, Optional<List<String>> translatableParams) Creates an instance of aMessagerecord class.- Parameters:
literal- the value for theliteralrecord componenttranslatable- the value for thetranslatablerecord componenttranslatableParams- the value for thetranslatableParamsrecord component
-
-
Method Details
-
asComponent
-
toString
-
hashCode
-
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). -
literal
-
translatable
-
translatableParams
-