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 Summary
FieldsModifier 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 Summary
ConstructorsConstructorDescriptionPlayerChatMessage(SignedMessageLink link, MessageSignature signature, SignedMessageBody signedBody, Component unsignedContent, FilterMask filterMask) Creates an instance of aPlayerChatMessagerecord class. -
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.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
-
link
The field for thelinkrecord component. -
signature
The field for thesignaturerecord component. -
signedBody
The field for thesignedBodyrecord component. -
unsignedContent
The field for theunsignedContentrecord component. -
filterMask
The field for thefilterMaskrecord component. -
MAP_CODEC
-
SYSTEM_SENDER
-
MESSAGE_EXPIRES_AFTER_SERVER
-
MESSAGE_EXPIRES_AFTER_CLIENT
-
-
Constructor Details
-
PlayerChatMessage
public PlayerChatMessage(SignedMessageLink link, @Nullable MessageSignature signature, SignedMessageBody signedBody, @Nullable Component unsignedContent, FilterMask filterMask) Creates an instance of aPlayerChatMessagerecord class.- Parameters:
link- the value for thelinkrecord componentsignature- the value for thesignaturerecord componentsignedBody- the value for thesignedBodyrecord componentunsignedContent- the value for theunsignedContentrecord componentfilterMask- the value for thefilterMaskrecord component
-
-
Method Details
-
system
-
unsigned
-
withUnsignedContent
-
removeUnsignedContent
-
filter
-
filter
-
removeSignature
-
updateSignature
public static void updateSignature(SignatureUpdater.Output p_250661_, SignedMessageLink p_248621_, SignedMessageBody p_248823_) throws SignatureException - Throws:
SignatureException
-
verify
-
signedContent
-
decoratedContent
-
timeStamp
-
salt
public long salt() -
hasExpiredServer
-
hasExpiredClient
-
sender
-
isSystem
public boolean isSystem() -
hasSignature
public boolean hasSignature() -
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). -
link
Returns the value of thelinkrecord component.- Returns:
- the value of the
linkrecord component
-
signature
Returns the value of thesignaturerecord component.- Returns:
- the value of the
signaturerecord 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
-