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
Modifier and TypeFieldDescriptionprivate final FilterMask
The field for thefilterMask
record component.private final SignedMessageLink
The field for thelink
record component.static final com.mojang.serialization.MapCodec
<PlayerChatMessage> static final Duration
static final Duration
private final MessageSignature
The field for thesignature
record component.private final SignedMessageBody
The field for thesignedBody
record component.private static final UUID
private final Component
The field for theunsignedContent
record component. -
Constructor Summary
ConstructorDescriptionPlayerChatMessage
(SignedMessageLink link, MessageSignature signature, SignedMessageBody signedBody, Component unsignedContent, FilterMask filterMask) Creates an instance of aPlayerChatMessage
record class. -
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
boolean
hasSignatureFrom
(UUID p_243236_) boolean
boolean
isSystem()
link()
Returns the value of thelink
record component.long
salt()
sender()
Returns the value of thesignature
record component.Returns the value of thesignedBody
record component.static PlayerChatMessage
final String
toString()
Returns a string representation of this record class.static PlayerChatMessage
Returns the value of theunsignedContent
record component.static void
updateSignature
(SignatureUpdater.Output p_250661_, SignedMessageLink p_248621_, SignedMessageBody p_248823_) boolean
verify
(SignatureValidator p_241442_) withUnsignedContent
(Component p_242164_)
-
Field Details
-
link
The field for thelink
record component. -
signature
The field for thesignature
record component. -
signedBody
The field for thesignedBody
record component. -
unsignedContent
The field for theunsignedContent
record component. -
filterMask
The field for thefilterMask
record 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 aPlayerChatMessage
record class.- Parameters:
link
- the value for thelink
record componentsignature
- the value for thesignature
record componentsignedBody
- the value for thesignedBody
record componentunsignedContent
- the value for theunsignedContent
record componentfilterMask
- the value for thefilterMask
record 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 thelink
record component.- Returns:
- the value of the
link
record component
-
signature
Returns the value of thesignature
record component.- Returns:
- the value of the
signature
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
-