Package net.minecraft.network.chat
Record Class PlayerChatMessage
java.lang.Object
java.lang.Record
net.minecraft.network.chat.PlayerChatMessage
public record PlayerChatMessage(SignedMessageHeader signedHeader, MessageSignature headerSignature, SignedMessageBody signedBody, Optional<Component> unsignedContent, FilterMask filterMask)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final FilterMaskThe field for thefilterMaskrecord component.private final MessageSignatureThe field for theheaderSignaturerecord component.static final Durationstatic final Durationprivate final SignedMessageBodyThe field for thesignedBodyrecord component.private final SignedMessageHeaderThe field for thesignedHeaderrecord component.The field for theunsignedContentrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionPlayerChatMessage(SignedMessageHeader signedHeader, MessageSignature headerSignature, SignedMessageBody signedBody, Optional<Component> unsignedContent, FilterMask filterMask) Creates an instance of aPlayerChatMessagerecord class.PlayerChatMessage(FriendlyByteBuf p_241419_) -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.filter(boolean p_243223_) filter(FilterMask p_243320_) Returns the value of thefilterMaskrecord component.booleanhasExpiredClient(Instant p_240629_) booleanhasExpiredServer(Instant p_240573_) final inthashCode()Returns a hash code value for this object.booleanhasSignatureFrom(UUID p_243236_) Returns the value of theheaderSignaturerecord component.booleanlongsalt()Returns the value of thesignedBodyrecord component.Returns the value of thesignedHeaderrecord component.signer()static PlayerChatMessagesystem(ChatMessageContent p_242910_) final StringtoString()Returns a string representation of this record class.static PlayerChatMessageunsigned(MessageSigner p_243247_, ChatMessageContent p_243279_) Returns the value of theunsignedContentrecord component.booleanverify(ChatSender p_241394_) booleanverify(SignatureValidator p_241442_) booleanverify(ProfilePublicKey p_237229_) withUnsignedContent(Component p_242164_) voidwrite(FriendlyByteBuf p_241490_)
-
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. -
filterMask
The field for thefilterMaskrecord component. -
MESSAGE_EXPIRES_AFTER_SERVER
-
MESSAGE_EXPIRES_AFTER_CLIENT
-
-
Constructor Details
-
PlayerChatMessage
-
PlayerChatMessage
public PlayerChatMessage(SignedMessageHeader signedHeader, MessageSignature headerSignature, SignedMessageBody signedBody, Optional<Component> unsignedContent, FilterMask filterMask) Creates an instance of aPlayerChatMessagerecord class.- Parameters:
signedHeader- the value for thesignedHeaderrecord componentheaderSignature- the value for theheaderSignaturerecord componentsignedBody- the value for thesignedBodyrecord componentunsignedContent- the value for theunsignedContentrecord componentfilterMask- the value for thefilterMaskrecord component
-
-
Method Details
-
system
-
unsigned
-
write
-
withUnsignedContent
-
removeUnsignedContent
-
filter
-
filter
-
verify
-
verify
-
verify
-
signedContent
-
serverContent
-
timeStamp
-
salt
public long salt() -
hasExpiredServer
-
hasExpiredClient
-
signer
-
toLastSeenEntry
-
hasSignatureFrom
-
isFullyFiltered
public boolean isFullyFiltered() -
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
-
filterMask
Returns the value of thefilterMaskrecord component.- Returns:
- the value of the
filterMaskrecord component
-