Record Class ServerboundChatPacket
java.lang.Object
java.lang.Record
net.minecraft.network.protocol.game.ServerboundChatPacket
- All Implemented Interfaces:
- Packet<ServerGamePacketListener>
public record ServerboundChatPacket(String message, Instant timeStamp, long salt, @Nullable MessageSignature signature, LastSeenMessages.Update lastSeenMessages)
extends Record
implements Packet<ServerGamePacketListener>
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final LastSeenMessages.UpdateThe field for thelastSeenMessagesrecord component.private final StringThe field for themessagerecord component.private final longThe field for thesaltrecord component.private final MessageSignatureThe field for thesignaturerecord component.private final InstantThe field for thetimeStamprecord component.
- 
Constructor SummaryConstructorsConstructorDescriptionServerboundChatPacket(String message, Instant timeStamp, long salt, MessageSignature signature, LastSeenMessages.Update lastSeenMessages) Creates an instance of aServerboundChatPacketrecord class.ServerboundChatPacket(FriendlyByteBuf p_179545_) 
- 
Method SummaryModifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.voidhandle(ServerGamePacketListener p_133836_) final inthashCode()Returns a hash code value for this object.Returns the value of thelastSeenMessagesrecord component.message()Returns the value of themessagerecord component.longsalt()Returns the value of thesaltrecord component.Returns the value of thesignaturerecord component.Returns the value of thetimeStamprecord component.final StringtoString()Returns a string representation of this record class.voidwrite(FriendlyByteBuf p_133839_) Methods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.network.protocol.PacketisSkippable, nextProtocol
- 
Field Details- 
messageThe field for themessagerecord component.
- 
timeStampThe field for thetimeStamprecord component.
- 
saltprivate final long saltThe field for thesaltrecord component.
- 
signatureThe field for thesignaturerecord component.
- 
lastSeenMessagesThe field for thelastSeenMessagesrecord component.
 
- 
- 
Constructor Details- 
ServerboundChatPacket
- 
ServerboundChatPacketpublic ServerboundChatPacket(String message, Instant timeStamp, long salt, @Nullable MessageSignature signature, LastSeenMessages.Update lastSeenMessages) Creates an instance of aServerboundChatPacketrecord class.- Parameters:
- message- the value for the- messagerecord component
- timeStamp- the value for the- timeStamprecord component
- salt- the value for the- saltrecord component
- signature- the value for the- signaturerecord component
- lastSeenMessages- the value for the- lastSeenMessagesrecord component
 
 
- 
- 
Method Details- 
write- Specified by:
- writein interface- Packet<ServerGamePacketListener>
 
- 
handle- Specified by:
- handlein interface- Packet<ServerGamePacketListener>
 
- 
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='.
- 
messageReturns the value of themessagerecord component.- Returns:
- the value of the messagerecord component
 
- 
timeStampReturns the value of thetimeStamprecord component.- Returns:
- the value of the timeStamprecord component
 
- 
saltpublic long salt()Returns the value of thesaltrecord component.- Returns:
- the value of the saltrecord component
 
- 
signatureReturns the value of thesignaturerecord component.- Returns:
- the value of the signaturerecord component
 
- 
lastSeenMessagesReturns the value of thelastSeenMessagesrecord component.- Returns:
- the value of the lastSeenMessagesrecord component
 
 
-