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
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionClientUpdateCommandBlockPacket(@NotNull Point blockPosition, @NotNull String command, @NotNull ClientUpdateCommandBlockPacket.Mode mode, byte flags) Creates an instance of aClientUpdateCommandBlockPacketrecord class.ClientUpdateCommandBlockPacket(@NotNull NetworkBuffer reader) -
Method Summary
Modifier and TypeMethodDescription@NotNull PointReturns the value of theblockPositionrecord component.@NotNull Stringcommand()Returns the value of thecommandrecord component.final booleanIndicates whether some other object is "equal to" this one.byteflags()Returns the value of theflagsrecord component.final inthashCode()Returns a hash code value for this object.@NotNull ClientUpdateCommandBlockPacket.Modemode()Returns the value of themoderecord component.final StringtoString()Returns a string representation of this record class.voidwrite(@NotNull NetworkBuffer writer)
-
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 aClientUpdateCommandBlockPacketrecord class.- Parameters:
blockPosition- the value for theblockPositionrecord componentcommand- the value for thecommandrecord componentmode- the value for themoderecord componentflags- the value for theflagsrecord component
-
-
Method Details
-
write
- Specified by:
writein 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 theblockPositionrecord component.- Returns:
- the value of the
blockPositionrecord component
-
command
Returns the value of thecommandrecord component.- Returns:
- the value of the
commandrecord component
-
mode
Returns the value of themoderecord component.- Returns:
- the value of the
moderecord component
-
flags
public byte flags()Returns the value of theflagsrecord component.- Returns:
- the value of the
flagsrecord component
-