Package net.minecraft.network.encryption
Record Class SignedChatMessage
java.lang.Object
java.lang.Record
net.minecraft.network.encryption.SignedChatMessage
- Record Components:
signedContent
-signature
-unsignedContent
-
public record SignedChatMessage(Text signedContent, ChatMessageSignature signature, Optional<Text> unsignedContent)
extends Record
A signed chat message, consisting of the signature, the signed content,
and the optional unsigned content supplied when the chat decorator produced
unsigned message due to the chat preview being disabled on either side.
Note that the signature itself might not be valid.
- Mappings:
Namespace Name official ru
intermediary net/minecraft/class_7471
named net/minecraft/network/encryption/SignedChatMessage
official a
intermediary comp_804
named signedContent
official b
intermediary comp_805
named signature
official c
intermediary comp_830
named unsignedContent
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ChatMessageSignature
The field for thesignature
record component.private final Text
The field for thesignedContent
record component.The field for theunsignedContent
record component. -
Constructor Summary
ConstructorsConstructorDescriptionSignedChatMessage
(Text text, ChatMessageSignature chatMessageSignature, Optional<Text> optional) -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.Returns the content of the message.final int
hashCode()
Returns a hash code value for this object.boolean
method_44310
(ServerPlayerEntity serverPlayerEntity) static Message<SignedChatMessage>
method_44311
(Message<Text> message, Message<Text> message2, ChatMessageSignature chatMessageSignature, boolean bool) boolean
method_44312
(ServerCommandSource serverCommandSource) static SignedChatMessage
method_44313
(Text text, Text text2, ChatMessageSignature chatMessageSignature, boolean bool) static SignedChatMessage
of
(String signedContent, ChatMessageSignature signature) Returns a new signed chat message withsignedContent
andsignature
.static SignedChatMessage
Returns a new signed chat message withsignedContent
and "none" signature.static SignedChatMessage
of
(Text signedContent, ChatMessageSignature signature) Returns a new signed chat message withsignedContent
andsignature
.Returns the value of thesignature
record component.Returns the value of thesignedContent
record component.final String
toString()
Returns a string representation of this record class.Returns the value of theunsignedContent
record component.boolean
verify
(PlayerPublicKey key) Returns whether the message can be verified using the public key.withUnsigned
(Text unsignedContent) Returns the new signed chat message withunsignedContent
added.
-
Field Details
-
signedContent
The field for thesignedContent
record component. -
signature
The field for thesignature
record component. -
unsignedContent
The field for theunsignedContent
record component.
-
-
Constructor Details
-
SignedChatMessage
public SignedChatMessage(Text text, ChatMessageSignature chatMessageSignature, Optional<Text> optional)
-
-
Method Details
-
of
Returns a new signed chat message withsignedContent
andsignature
.- Returns:
- a new signed chat message with
signedContent
andsignature
- Mappings:
Namespace Name Mixin selector official a
Lru;a(Lrm;Lrr;)Lru;
intermediary method_44128
Lnet/minecraft/class_7471;method_44128(Lnet/minecraft/class_2561;Lnet/minecraft/class_7469;)Lnet/minecraft/class_7471;
named of
Lnet/minecraft/network/encryption/SignedChatMessage;of(Lnet/minecraft/text/Text;Lnet/minecraft/network/encryption/ChatMessageSignature;)Lnet/minecraft/network/encryption/SignedChatMessage;
-
of
Returns a new signed chat message withsignedContent
andsignature
.- Returns:
- a new signed chat message with
signedContent
andsignature
- Mappings:
Namespace Name Mixin selector official a
Lru;a(Ljava/lang/String;Lrr;)Lru;
intermediary method_44126
Lnet/minecraft/class_7471;method_44126(Ljava/lang/String;Lnet/minecraft/class_7469;)Lnet/minecraft/class_7471;
named of
Lnet/minecraft/network/encryption/SignedChatMessage;of(Ljava/lang/String;Lnet/minecraft/network/encryption/ChatMessageSignature;)Lnet/minecraft/network/encryption/SignedChatMessage;
-
method_44313
public static SignedChatMessage method_44313(Text text, Text text2, ChatMessageSignature chatMessageSignature, boolean bool) - Mappings:
Namespace Name Mixin selector official a
Lru;a(Lrm;Lrm;Lrr;Z)Lru;
intermediary method_44313
Lnet/minecraft/class_7471;method_44313(Lnet/minecraft/class_2561;Lnet/minecraft/class_2561;Lnet/minecraft/class_7469;Z)Lnet/minecraft/class_7471;
named method_44313
Lnet/minecraft/network/encryption/SignedChatMessage;method_44313(Lnet/minecraft/text/Text;Lnet/minecraft/text/Text;Lnet/minecraft/network/encryption/ChatMessageSignature;Z)Lnet/minecraft/network/encryption/SignedChatMessage;
-
method_44311
public static Message<SignedChatMessage> method_44311(Message<Text> message, Message<Text> message2, ChatMessageSignature chatMessageSignature, boolean bool) - Mappings:
Namespace Name Mixin selector official a
Lru;a(Lagd;Lagd;Lrr;Z)Lagd;
intermediary method_44311
Lnet/minecraft/class_7471;method_44311(Lnet/minecraft/class_5837;Lnet/minecraft/class_5837;Lnet/minecraft/class_7469;Z)Lnet/minecraft/class_5837;
named method_44311
Lnet/minecraft/network/encryption/SignedChatMessage;method_44311(Lnet/minecraft/server/filter/Message;Lnet/minecraft/server/filter/Message;Lnet/minecraft/network/encryption/ChatMessageSignature;Z)Lnet/minecraft/server/filter/Message;
-
of
Returns a new signed chat message withsignedContent
and "none" signature.- Returns:
- a new signed chat message with
signedContent
and "none" signature - Mappings:
Namespace Name Mixin selector official a
Lru;a(Lrm;)Lru;
intermediary method_44127
Lnet/minecraft/class_7471;method_44127(Lnet/minecraft/class_2561;)Lnet/minecraft/class_7471;
named of
Lnet/minecraft/network/encryption/SignedChatMessage;of(Lnet/minecraft/text/Text;)Lnet/minecraft/network/encryption/SignedChatMessage;
-
withUnsigned
Returns the new signed chat message withunsignedContent
added.- Returns:
- the new signed chat message with
unsignedContent
added - API Note:
- This is used in vanilla when chat decorator decorates the message without the client previewing it. In this case, the undecorated content is signed but the decorated content is unsigned.
- Mappings:
Namespace Name Mixin selector official b
Lru;b(Lrm;)Lru;
intermediary method_44129
Lnet/minecraft/class_7471;method_44129(Lnet/minecraft/class_2561;)Lnet/minecraft/class_7471;
named withUnsigned
Lnet/minecraft/network/encryption/SignedChatMessage;withUnsigned(Lnet/minecraft/text/Text;)Lnet/minecraft/network/encryption/SignedChatMessage;
-
verify
Returns whether the message can be verified using the public key.- Returns:
- whether the message can be verified using the public key
- Mappings:
Namespace Name Mixin selector official a
Lru;a(Lbtg;)Z
intermediary method_43867
Lnet/minecraft/class_7471;method_43867(Lnet/minecraft/class_7428;)Z
named verify
Lnet/minecraft/network/encryption/SignedChatMessage;verify(Lnet/minecraft/network/encryption/PlayerPublicKey;)Z
-
method_44310
- Mappings:
Namespace Name Mixin selector official a
Lru;a(Lafp;)Z
intermediary method_44310
Lnet/minecraft/class_7471;method_44310(Lnet/minecraft/class_3222;)Z
named method_44310
Lnet/minecraft/network/encryption/SignedChatMessage;method_44310(Lnet/minecraft/server/network/ServerPlayerEntity;)Z
-
method_44312
- Mappings:
Namespace Name Mixin selector official a
Lru;a(Ldr;)Z
intermediary method_44312
Lnet/minecraft/class_7471;method_44312(Lnet/minecraft/class_2168;)Z
named method_44312
Lnet/minecraft/network/encryption/SignedChatMessage;method_44312(Lnet/minecraft/server/command/ServerCommandSource;)Z
-
getContent
Returns the content of the message.This returns the unsigned content if present, and fallbacks to the signed content.
- Returns:
- the content of the message
- Mappings:
Namespace Name Mixin selector official a
Lru;a()Lrm;
intermediary method_44125
Lnet/minecraft/class_7471;method_44125()Lnet/minecraft/class_2561;
named getContent
Lnet/minecraft/network/encryption/SignedChatMessage;getContent()Lnet/minecraft/text/Text;
-
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)
. -
signedContent
Returns the value of thesignedContent
record component.- Returns:
- the value of the
signedContent
record component
-
signature
Returns the value of thesignature
record component.- Returns:
- the value of the
signature
record component
-
unsignedContent
Returns the value of theunsignedContent
record component.- Returns:
- the value of the
unsignedContent
record component
-