Record Class ServerboundChatCommandPacket
java.lang.Object
java.lang.Record
net.minecraft.network.protocol.game.ServerboundChatCommandPacket
- All Implemented Interfaces:
Packet<ServerGamePacketListener>
public record ServerboundChatCommandPacket(String command, Instant timeStamp, long salt, ArgumentSignatures argumentSignatures, LastSeenMessages.Update lastSeenMessages)
extends Record
implements Packet<ServerGamePacketListener>
-
Field Summary
Modifier and TypeFieldDescriptionprivate final ArgumentSignatures
The field for theargumentSignatures
record component.private final String
The field for thecommand
record component.private final LastSeenMessages.Update
The field for thelastSeenMessages
record component.private final long
The field for thesalt
record component.private final Instant
The field for thetimeStamp
record component. -
Constructor Summary
ConstructorDescriptionServerboundChatCommandPacket
(String command, Instant timeStamp, long salt, ArgumentSignatures argumentSignatures, LastSeenMessages.Update lastSeenMessages) Creates an instance of aServerboundChatCommandPacket
record class.ServerboundChatCommandPacket
(FriendlyByteBuf p_237932_) -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theargumentSignatures
record component.command()
Returns the value of thecommand
record component.final boolean
Indicates whether some other object is "equal to" this one.void
handle
(ServerGamePacketListener p_237940_) final int
hashCode()
Returns a hash code value for this object.Returns the value of thelastSeenMessages
record component.long
salt()
Returns the value of thesalt
record component.Returns the value of thetimeStamp
record component.final String
toString()
Returns a string representation of this record class.void
write
(FriendlyByteBuf p_237936_) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraft.network.protocol.Packet
isSkippable, nextProtocol
-
Field Details
-
command
The field for thecommand
record component. -
timeStamp
The field for thetimeStamp
record component. -
salt
private final long saltThe field for thesalt
record component. -
argumentSignatures
The field for theargumentSignatures
record component. -
lastSeenMessages
The field for thelastSeenMessages
record component.
-
-
Constructor Details
-
ServerboundChatCommandPacket
-
ServerboundChatCommandPacket
public ServerboundChatCommandPacket(String command, Instant timeStamp, long salt, ArgumentSignatures argumentSignatures, LastSeenMessages.Update lastSeenMessages) Creates an instance of aServerboundChatCommandPacket
record class.- Parameters:
command
- the value for thecommand
record componenttimeStamp
- the value for thetimeStamp
record componentsalt
- the value for thesalt
record componentargumentSignatures
- the value for theargumentSignatures
record componentlastSeenMessages
- the value for thelastSeenMessages
record component
-
-
Method Details
-
write
- Specified by:
write
in interfacePacket<ServerGamePacketListener>
-
handle
- Specified by:
handle
in interfacePacket<ServerGamePacketListener>
-
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. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
command
Returns the value of thecommand
record component.- Returns:
- the value of the
command
record component
-
timeStamp
Returns the value of thetimeStamp
record component.- Returns:
- the value of the
timeStamp
record component
-
salt
public long salt()Returns the value of thesalt
record component.- Returns:
- the value of the
salt
record component
-
argumentSignatures
Returns the value of theargumentSignatures
record component.- Returns:
- the value of the
argumentSignatures
record component
-
lastSeenMessages
Returns the value of thelastSeenMessages
record component.- Returns:
- the value of the
lastSeenMessages
record component
-