Package net.minecraft.network.chat
Record Class PlayerChatMessage
java.lang.Object
java.lang.Record
net.minecraft.network.chat.PlayerChatMessage
public record PlayerChatMessage(SignedMessageLink link, @Nullable MessageSignature signature, SignedMessageBody signedBody, @Nullable Component unsignedContent, FilterMask filterMask)
extends Record
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final FilterMaskThe field for thefilterMaskrecord component.private final SignedMessageLinkThe field for thelinkrecord component.static final com.mojang.serialization.MapCodec<PlayerChatMessage>static final Durationstatic final Durationprivate final MessageSignatureThe field for thesignaturerecord component.private final SignedMessageBodyThe field for thesignedBodyrecord component.private static final UUIDprivate final ComponentThe field for theunsignedContentrecord component.
- 
Constructor SummaryConstructorsConstructorDescriptionPlayerChatMessage(SignedMessageLink link, MessageSignature signature, SignedMessageBody signedBody, Component unsignedContent, FilterMask filterMask) Creates an instance of aPlayerChatMessagerecord class.
- 
Method SummaryModifier 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.booleanbooleanhasSignatureFrom(UUID p_243236_) booleanbooleanisSystem()link()Returns the value of thelinkrecord component.longsalt()sender()Returns the value of thesignaturerecord component.Returns the value of thesignedBodyrecord component.static PlayerChatMessagefinal StringtoString()Returns a string representation of this record class.static PlayerChatMessageReturns the value of theunsignedContentrecord component.static voidupdateSignature(SignatureUpdater.Output p_250661_, SignedMessageLink p_248621_, SignedMessageBody p_248823_) booleanverify(SignatureValidator p_241442_) withUnsignedContent(Component p_242164_) 
- 
Field Details- 
linkThe field for thelinkrecord component.
- 
signatureThe field for thesignaturerecord component.
- 
signedBodyThe field for thesignedBodyrecord component.
- 
unsignedContentThe field for theunsignedContentrecord component.
- 
filterMaskThe field for thefilterMaskrecord component.
- 
MAP_CODEC
- 
SYSTEM_SENDER
- 
MESSAGE_EXPIRES_AFTER_SERVER
- 
MESSAGE_EXPIRES_AFTER_CLIENT
 
- 
- 
Constructor Details- 
PlayerChatMessagepublic PlayerChatMessage(SignedMessageLink link, @Nullable MessageSignature signature, SignedMessageBody signedBody, @Nullable Component unsignedContent, FilterMask filterMask) Creates an instance of aPlayerChatMessagerecord class.- Parameters:
- link- the value for the- linkrecord component
- signature- the value for the- signaturerecord component
- signedBody- the value for the- signedBodyrecord component
- unsignedContent- the value for the- unsignedContentrecord component
- filterMask- the value for the- filterMaskrecord component
 
 
- 
- 
Method Details- 
system
- 
unsigned
- 
withUnsignedContent
- 
removeUnsignedContent
- 
filter
- 
filter
- 
updateSignaturepublic static void updateSignature(SignatureUpdater.Output p_250661_, SignedMessageLink p_248621_, SignedMessageBody p_248823_) throws SignatureException - Throws:
- SignatureException
 
- 
verify
- 
signedContent
- 
decoratedContent
- 
timeStamp
- 
saltpublic long salt()
- 
hasExpiredServer
- 
hasExpiredClient
- 
sender
- 
isSystempublic boolean isSystem()
- 
hasSignaturepublic boolean hasSignature()
- 
hasSignatureFrom
- 
isFullyFilteredpublic boolean isFullyFiltered()
- 
toStringReturns 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.
- 
hashCodepublic 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.
- 
equalsIndicates 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).
- 
linkReturns the value of thelinkrecord component.- Returns:
- the value of the linkrecord component
 
- 
signatureReturns the value of thesignaturerecord component.- Returns:
- the value of the signaturerecord component
 
- 
signedBodyReturns the value of thesignedBodyrecord component.- Returns:
- the value of the signedBodyrecord component
 
- 
unsignedContentReturns the value of theunsignedContentrecord component.- Returns:
- the value of the unsignedContentrecord component
 
- 
filterMaskReturns the value of thefilterMaskrecord component.- Returns:
- the value of the filterMaskrecord component
 
 
-