Record Class HelloMessage
java.lang.Object
java.lang.Record
fr.ghostrider584.axiom.network.packet.client.HelloMessage
- All Implemented Interfaces:
net.minestom.server.network.packet.client.ClientPacket, net.minestom.server.network.packet.client.ClientPacket.Play, net.minestom.server.network.packet.Packet
public record HelloMessage(int apiVersion, int dataVersion, int protocolVersion, long handshakeId)
extends Record
implements net.minestom.server.network.packet.client.ClientPacket.Play
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minestom.server.network.packet.client.ClientPacket
net.minestom.server.network.packet.client.ClientPacket.Configuration, net.minestom.server.network.packet.client.ClientPacket.Handshake, net.minestom.server.network.packet.client.ClientPacket.Login, net.minestom.server.network.packet.client.ClientPacket.Play, net.minestom.server.network.packet.client.ClientPacket.Status -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final net.minestom.server.network.NetworkBuffer.Type<HelloMessage> -
Constructor Summary
ConstructorsConstructorDescriptionHelloMessage(int apiVersion, int dataVersion, int protocolVersion, long handshakeId) Creates an instance of aHelloMessagerecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of theapiVersionrecord component.intReturns the value of thedataVersionrecord component.final booleanIndicates whether some other object is "equal to" this one.longReturns the value of thehandshakeIdrecord component.final inthashCode()Returns a hash code value for this object.intReturns the value of theprotocolVersionrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
TYPE
-
-
Constructor Details
-
HelloMessage
public HelloMessage(int apiVersion, int dataVersion, int protocolVersion, long handshakeId) Creates an instance of aHelloMessagerecord class.- Parameters:
apiVersion- the value for theapiVersionrecord componentdataVersion- the value for thedataVersionrecord componentprotocolVersion- the value for theprotocolVersionrecord componenthandshakeId- the value for thehandshakeIdrecord 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. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
apiVersion
public int apiVersion()Returns the value of theapiVersionrecord component.- Returns:
- the value of the
apiVersionrecord component
-
dataVersion
public int dataVersion()Returns the value of thedataVersionrecord component.- Returns:
- the value of the
dataVersionrecord component
-
protocolVersion
public int protocolVersion()Returns the value of theprotocolVersionrecord component.- Returns:
- the value of the
protocolVersionrecord component
-
handshakeId
public long handshakeId()Returns the value of thehandshakeIdrecord component.- Returns:
- the value of the
handshakeIdrecord component
-