Record Class ClientHandshakePacket
java.lang.Object
java.lang.Record
net.minestom.server.network.packet.client.handshake.ClientHandshakePacket
- All Implemented Interfaces:
ClientPacket
public record ClientHandshakePacket(int protocolVersion, String serverAddress, int serverPort, ClientHandshakePacket.Intent intent)
extends Record
implements ClientPacket
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionClientHandshakePacket(int protocolVersion, String serverAddress, int serverPort, ClientHandshakePacket.Intent intent) Creates an instance of aClientHandshakePacketrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intent()Returns the value of theintentrecord component.intReturns the value of theprotocolVersionrecord component.Returns the value of theserverAddressrecord component.intReturns the value of theserverPortrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
SERIALIZER
-
-
Constructor Details
-
ClientHandshakePacket
public ClientHandshakePacket(int protocolVersion, String serverAddress, int serverPort, ClientHandshakePacket.Intent intent) Creates an instance of aClientHandshakePacketrecord class.- Parameters:
protocolVersion- the value for theprotocolVersionrecord componentserverAddress- the value for theserverAddressrecord componentserverPort- the value for theserverPortrecord componentintent- the value for theintentrecord component
-
-
Method Details
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
protocolVersion
public int protocolVersion()Returns the value of theprotocolVersionrecord component.- Returns:
- the value of the
protocolVersionrecord component
-
serverAddress
Returns the value of theserverAddressrecord component.- Returns:
- the value of the
serverAddressrecord component
-
serverPort
public int serverPort()Returns the value of theserverPortrecord component.- Returns:
- the value of the
serverPortrecord component
-
intent
Returns the value of theintentrecord component.- Returns:
- the value of the
intentrecord component
-