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
Modifier and TypeFieldDescriptionprivate final FilterMask
The field for thefilterMask
record component.private final MessageSignature
The field for theheaderSignature
record component.static final Duration
static final Duration
private final SignedMessageBody
The field for thesignedBody
record component.private final SignedMessageHeader
The field for thesignedHeader
record component.The field for theunsignedContent
record component. -
Constructor Summary
ConstructorDescriptionPlayerChatMessage
(SignedMessageHeader signedHeader, MessageSignature headerSignature, SignedMessageBody signedBody, Optional<Component> unsignedContent, FilterMask filterMask) Creates an instance of aPlayerChatMessage
record class.PlayerChatMessage
(FriendlyByteBuf p_241419_) -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.filter
(boolean p_243223_) filter
(FilterMask p_243320_) Returns the value of thefilterMask
record component.boolean
hasExpiredClient
(Instant p_240629_) boolean
hasExpiredServer
(Instant p_240573_) final int
hashCode()
Returns a hash code value for this object.boolean
hasSignatureFrom
(UUID p_243236_) Returns the value of theheaderSignature
record component.boolean
long
salt()
Returns the value of thesignedBody
record component.Returns the value of thesignedHeader
record component.signer()
static PlayerChatMessage
system
(ChatMessageContent p_242910_) final String
toString()
Returns a string representation of this record class.static PlayerChatMessage
unsigned
(MessageSigner p_243247_, ChatMessageContent p_243279_) Returns the value of theunsignedContent
record component.boolean
verify
(ChatSender p_241394_) boolean
verify
(SignatureValidator p_241442_) boolean
verify
(ProfilePublicKey p_237229_) withUnsignedContent
(Component p_242164_) void
write
(FriendlyByteBuf p_241490_)
-
Field Details
-
signedHeader
The field for thesignedHeader
record component. -
headerSignature
The field for theheaderSignature
record component. -
signedBody
The field for thesignedBody
record component. -
unsignedContent
The field for theunsignedContent
record component. -
filterMask
The field for thefilterMask
record 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 aPlayerChatMessage
record class.- Parameters:
signedHeader
- the value for thesignedHeader
record componentheaderSignature
- the value for theheaderSignature
record componentsignedBody
- the value for thesignedBody
record componentunsignedContent
- the value for theunsignedContent
record componentfilterMask
- the value for thefilterMask
record 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 thesignedHeader
record component.- Returns:
- the value of the
signedHeader
record component
-
headerSignature
Returns the value of theheaderSignature
record component.- Returns:
- the value of the
headerSignature
record component
-
signedBody
Returns the value of thesignedBody
record component.- Returns:
- the value of the
signedBody
record component
-
unsignedContent
Returns the value of theunsignedContent
record component.- Returns:
- the value of the
unsignedContent
record component
-
filterMask
Returns the value of thefilterMask
record component.- Returns:
- the value of the
filterMask
record component
-