Package net.minecraft.network.message
Record Class SignedMessage
java.lang.Object
java.lang.Record
net.minecraft.network.message.SignedMessage
- Record Components:
signedHeader-headerSignature-signedBody-unsignedContent-
public record SignedMessage(class_7614 signedHeader, MessageSignature headerSignature, class_7608 signedBody, Optional<Text> unsignedContent)
extends Record
A signed 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 rvintermediary net/minecraft/class_7471named net/minecraft/network/message/SignedMessageofficial cintermediary comp_926named signedHeaderofficial dintermediary comp_927named headerSignatureofficial eintermediary comp_928named signedBodyofficial fintermediary comp_830named unsignedContent
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Durationprivate final MessageSignatureThe field for theheaderSignaturerecord component.static final Durationprivate final class_7608The field for thesignedBodyrecord component.private final class_7614The field for thesignedHeaderrecord component.The field for theunsignedContentrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionSignedMessage(class_7614 class_7614, MessageSignature messageSignature, class_7608 class_7608, Optional<Text> optional) SignedMessage(PacketByteBuf packetByteBuf) -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns the content of the message.final inthashCode()Returns a hash code value for this object.Returns the value of theheaderSignaturerecord component.booleanisExpiredOnClient(Instant currentTime) booleanisExpiredOnServer(Instant currentTime) booleanmethod_44858(SignatureVerifier signatureVerifier) voidmethod_44859(PacketByteBuf packetByteBuf) method_44860(@Nullable Text text) static SignedMessagemethod_44861(ChatMessageSigner chatMessageSigner, Text text) method_44863(Text text) longReturns the value of thesignedBodyrecord component.Returns the value of thesignedHeaderrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of theunsignedContentrecord component.booleanverify(PlayerPublicKey key) Returns whether the message can be verified using the public key.booleanverify(MessageSender messageSender) Returns whether the message can be verified using the public key or if the player does not have the key.Returns the signed chat message withunsignedContentremoved if it exists.
-
Field Details
-
signedHeader
The field for thesignedHeaderrecord component. -
headerSignature
The field for theheaderSignaturerecord component. -
signedBody
The field for thesignedBodyrecord component. -
unsignedContent
The field for theunsignedContentrecord component. -
SERVERBOUND_TIME_TO_LIVE
- Mappings:
Namespace Name Mixin selector official aLrv;a:Ljava/time/Duration;intermediary field_39786Lnet/minecraft/class_7471;field_39786:Ljava/time/Duration;named SERVERBOUND_TIME_TO_LIVELnet/minecraft/network/message/SignedMessage;SERVERBOUND_TIME_TO_LIVE:Ljava/time/Duration;
-
CLIENTBOUND_TIME_TO_LIVE
- Mappings:
Namespace Name Mixin selector official bLrv;b:Ljava/time/Duration;intermediary field_39787Lnet/minecraft/class_7471;field_39787:Ljava/time/Duration;named CLIENTBOUND_TIME_TO_LIVELnet/minecraft/network/message/SignedMessage;CLIENTBOUND_TIME_TO_LIVE:Ljava/time/Duration;
-
-
Constructor Details
-
SignedMessage
-
SignedMessage
public SignedMessage(class_7614 class_7614, MessageSignature messageSignature, class_7608 class_7608, Optional<Text> optional)
-
-
Method Details
-
method_44861
- Mappings:
Namespace Name Mixin selector official aLrv;a(Lrs;Lrm;)Lrv;intermediary method_44861Lnet/minecraft/class_7471;method_44861(Lnet/minecraft/class_7470;Lnet/minecraft/class_2561;)Lnet/minecraft/class_7471;named method_44861Lnet/minecraft/network/message/SignedMessage;method_44861(Lnet/minecraft/network/message/ChatMessageSigner;Lnet/minecraft/text/Text;)Lnet/minecraft/network/message/SignedMessage;
-
method_44859
- Mappings:
Namespace Name Mixin selector official aLrv;a(Lqx;)Vintermediary method_44859Lnet/minecraft/class_7471;method_44859(Lnet/minecraft/class_2540;)Vnamed method_44859Lnet/minecraft/network/message/SignedMessage;method_44859(Lnet/minecraft/network/PacketByteBuf;)V
-
method_44860
- Mappings:
Namespace Name Mixin selector official aLrv;a(Lrm;)Lagl;intermediary method_44860Lnet/minecraft/class_7471;method_44860(Lnet/minecraft/class_2561;)Lnet/minecraft/class_5837;named method_44860Lnet/minecraft/network/message/SignedMessage;method_44860(Lnet/minecraft/text/Text;)Lnet/minecraft/server/filter/FilteredMessage;
-
method_44863
- Mappings:
Namespace Name Mixin selector official bLrv;b(Lrm;)Lrv;intermediary method_44863Lnet/minecraft/class_7471;method_44863(Lnet/minecraft/class_2561;)Lnet/minecraft/class_7471;named method_44863Lnet/minecraft/network/message/SignedMessage;method_44863(Lnet/minecraft/text/Text;)Lnet/minecraft/network/message/SignedMessage;
-
withoutUnsigned
Returns the signed chat message withunsignedContentremoved if it exists.- Returns:
- the signed chat message with
unsignedContentremoved if it exists - Implementation Note:
- This returns itself if the message does not have an unsigned content.
- Mappings:
Namespace Name Mixin selector official aLrv;a()Lrv;intermediary method_44607Lnet/minecraft/class_7471;method_44607()Lnet/minecraft/class_7471;named withoutUnsignedLnet/minecraft/network/message/SignedMessage;withoutUnsigned()Lnet/minecraft/network/message/SignedMessage;
-
method_44858
- Mappings:
Namespace Name Mixin selector official aLrv;a(Lame;)Zintermediary method_44858Lnet/minecraft/class_7471;method_44858(Lnet/minecraft/class_7500;)Znamed method_44858Lnet/minecraft/network/message/SignedMessage;method_44858(Lnet/minecraft/network/encryption/SignatureVerifier;)Z
-
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 aLrv;a(Lbts;)Zintermediary method_43867Lnet/minecraft/class_7471;method_43867(Lnet/minecraft/class_7428;)Znamed verifyLnet/minecraft/network/message/SignedMessage;verify(Lnet/minecraft/network/encryption/PlayerPublicKey;)Z
-
verify
Returns whether the message can be verified using the public key or if the player does not have the key.- Returns:
- whether the message can be verified using the public key or if the player does not have the key
- Mappings:
Namespace Name Mixin selector official aLrv;a(Lrh;)Zintermediary method_44310Lnet/minecraft/class_7471;method_44310(Lnet/minecraft/class_7436;)Znamed verifyLnet/minecraft/network/message/SignedMessage;verify(Lnet/minecraft/network/message/MessageSender;)Z
-
method_44862
- Mappings:
Namespace Name Mixin selector official bLrv;b()Lrm;intermediary method_44862Lnet/minecraft/class_7471;method_44862()Lnet/minecraft/class_2561;named method_44862Lnet/minecraft/network/message/SignedMessage;method_44862()Lnet/minecraft/text/Text;
-
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 cLrv;c()Lrm;intermediary method_44125Lnet/minecraft/class_7471;method_44125()Lnet/minecraft/class_2561;named getContentLnet/minecraft/network/message/SignedMessage;getContent()Lnet/minecraft/text/Text;
-
method_44864
- Mappings:
Namespace Name Mixin selector official dLrv;d()Ljava/time/Instant;intermediary method_44864Lnet/minecraft/class_7471;method_44864()Ljava/time/Instant;named method_44864Lnet/minecraft/network/message/SignedMessage;method_44864()Ljava/time/Instant;
-
method_44865
public long method_44865()- Mappings:
Namespace Name Mixin selector official eLrv;e()Jintermediary method_44865Lnet/minecraft/class_7471;method_44865()Jnamed method_44865Lnet/minecraft/network/message/SignedMessage;method_44865()J
-
isExpiredOnServer
- Mappings:
Namespace Name Mixin selector official aLrv;a(Ljava/time/Instant;)Zintermediary method_44747Lnet/minecraft/class_7471;method_44747(Ljava/time/Instant;)Znamed isExpiredOnServerLnet/minecraft/network/message/SignedMessage;isExpiredOnServer(Ljava/time/Instant;)Z
-
isExpiredOnClient
- Mappings:
Namespace Name Mixin selector official bLrv;b(Ljava/time/Instant;)Zintermediary method_44748Lnet/minecraft/class_7471;method_44748(Ljava/time/Instant;)Znamed isExpiredOnClientLnet/minecraft/network/message/SignedMessage;isExpiredOnClient(Ljava/time/Instant;)Z
-
method_44866
- Mappings:
Namespace Name Mixin selector official fLrv;f()Lrs;intermediary method_44866Lnet/minecraft/class_7471;method_44866()Lnet/minecraft/class_7470;named method_44866Lnet/minecraft/network/message/SignedMessage;method_44866()Lnet/minecraft/network/message/ChatMessageSigner;
-
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). -
signedHeader
Returns the value of thesignedHeaderrecord component.- Returns:
- the value of the
signedHeaderrecord component
-
headerSignature
Returns the value of theheaderSignaturerecord component.- Returns:
- the value of the
headerSignaturerecord component
-
signedBody
Returns the value of thesignedBodyrecord component.- Returns:
- the value of the
signedBodyrecord component
-
unsignedContent
Returns the value of theunsignedContentrecord component.- Returns:
- the value of the
unsignedContentrecord component
-