Record Class ClientInputPacket
java.lang.Object
java.lang.Record
net.minestom.server.network.packet.client.play.ClientInputPacket
- All Implemented Interfaces:
ClientPacket
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionClientInputPacket(boolean forward, boolean backward, boolean left, boolean right, boolean jump, boolean shift, boolean sprint) ClientInputPacket(byte flags) Creates an instance of aClientInputPacketrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanbackward()final booleanIndicates whether some other object is "equal to" this one.byteflags()Returns the value of theflagsrecord component.booleanforward()final inthashCode()Returns a hash code value for this object.booleanjump()booleanleft()booleanright()booleanshift()booleansprint()final StringtoString()Returns a string representation of this record class.
-
Field Details
-
SERIALIZER
-
-
Constructor Details
-
ClientInputPacket
public ClientInputPacket(boolean forward, boolean backward, boolean left, boolean right, boolean jump, boolean shift, boolean sprint) -
ClientInputPacket
public ClientInputPacket(byte flags) Creates an instance of aClientInputPacketrecord class.- Parameters:
flags- the value for theflagsrecord component
-
-
Method Details
-
forward
public boolean forward() -
backward
public boolean backward() -
left
public boolean left() -
right
public boolean right() -
jump
public boolean jump() -
shift
public boolean shift() -
sprint
public boolean sprint() -
toString
-
hashCode
-
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 with thecomparemethod from their corresponding wrapper classes. -
flags
public byte flags()Returns the value of theflagsrecord component.- Returns:
- the value of the
flagsrecord component
-