Record Class ClientUpdateCommandBlockPacket
java.lang.Object
java.lang.Record
net.minestom.server.network.packet.client.play.ClientUpdateCommandBlockPacket
- All Implemented Interfaces:
NetworkBuffer.Writer
,ClientPacket
public record ClientUpdateCommandBlockPacket(@NotNull Point blockPosition, @NotNull String command, @NotNull ClientUpdateCommandBlockPacket.Mode mode, byte flags)
extends Record
implements ClientPacket
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionClientUpdateCommandBlockPacket
(@NotNull Point blockPosition, @NotNull String command, @NotNull ClientUpdateCommandBlockPacket.Mode mode, byte flags) Creates an instance of aClientUpdateCommandBlockPacket
record class.ClientUpdateCommandBlockPacket
(@NotNull NetworkBuffer reader) -
Method Summary
Modifier and TypeMethodDescription@NotNull Point
Returns the value of theblockPosition
record component.@NotNull String
command()
Returns the value of thecommand
record component.final boolean
Indicates whether some other object is "equal to" this one.byte
flags()
Returns the value of theflags
record component.final int
hashCode()
Returns a hash code value for this object.@NotNull ClientUpdateCommandBlockPacket.Mode
mode()
Returns the value of themode
record component.final String
toString()
Returns a string representation of this record class.void
write
(@NotNull NetworkBuffer writer) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minestom.server.network.packet.client.ClientPacket
processImmediately
-
Constructor Details
-
ClientUpdateCommandBlockPacket
-
ClientUpdateCommandBlockPacket
public ClientUpdateCommandBlockPacket(@NotNull @NotNull Point blockPosition, @NotNull @NotNull String command, @NotNull @NotNull ClientUpdateCommandBlockPacket.Mode mode, byte flags) Creates an instance of aClientUpdateCommandBlockPacket
record class.- Parameters:
blockPosition
- the value for theblockPosition
record componentcommand
- the value for thecommand
record componentmode
- the value for themode
record componentflags
- the value for theflags
record component
-
-
Method Details
-
write
- Specified by:
write
in interfaceNetworkBuffer.Writer
-
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 '=='. -
blockPosition
Returns the value of theblockPosition
record component.- Returns:
- the value of the
blockPosition
record component
-
command
Returns the value of thecommand
record component.- Returns:
- the value of the
command
record component
-
mode
Returns the value of themode
record component.- Returns:
- the value of the
mode
record component
-
flags
public byte flags()Returns the value of theflags
record component.- Returns:
- the value of the
flags
record component
-