Record Class PacketParser.Client
java.lang.Object
java.lang.Record
net.minestom.server.network.packet.PacketParser.Client
- All Implemented Interfaces:
PacketParser<ClientPacket>
- Enclosing interface:
PacketParser<T>
public static record PacketParser.Client(PacketRegistry<ClientPacket> handshake, PacketRegistry<ClientPacket> status, PacketRegistry<ClientPacket> login, PacketRegistry<ClientPacket> configuration, PacketRegistry<ClientPacket> play)
extends Record
implements PacketParser<ClientPacket>
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minestom.server.network.packet.PacketParser
PacketParser.Client, PacketParser.Server
-
Constructor Summary
ConstructorDescriptionClient()
Client
(PacketRegistry<ClientPacket> handshake, PacketRegistry<ClientPacket> status, PacketRegistry<ClientPacket> login, PacketRegistry<ClientPacket> configuration, PacketRegistry<ClientPacket> play) Creates an instance of aClient
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theconfiguration
record component.final boolean
Indicates whether some other object is "equal to" this one.Returns the value of thehandshake
record component.final int
hashCode()
Returns a hash code value for this object.login()
Returns the value of thelogin
record component.play()
Returns the value of theplay
record component.status()
Returns the value of thestatus
record component.final String
toString()
Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minestom.server.network.packet.PacketParser
parse, stateRegistry
-
Constructor Details
-
Client
public Client() -
Client
public Client(PacketRegistry<ClientPacket> handshake, PacketRegistry<ClientPacket> status, PacketRegistry<ClientPacket> login, PacketRegistry<ClientPacket> configuration, PacketRegistry<ClientPacket> play) Creates an instance of aClient
record class.- Parameters:
handshake
- the value for thehandshake
record componentstatus
- the value for thestatus
record componentlogin
- the value for thelogin
record componentconfiguration
- the value for theconfiguration
record componentplay
- the value for theplay
record component
-
-
Method Details
-
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. All components in this record class are compared withObjects::equals(Object,Object)
. -
handshake
Returns the value of thehandshake
record component.- Specified by:
handshake
in interfacePacketParser<ClientPacket>
- Returns:
- the value of the
handshake
record component
-
status
Returns the value of thestatus
record component.- Specified by:
status
in interfacePacketParser<ClientPacket>
- Returns:
- the value of the
status
record component
-
login
Returns the value of thelogin
record component.- Specified by:
login
in interfacePacketParser<ClientPacket>
- Returns:
- the value of the
login
record component
-
configuration
Returns the value of theconfiguration
record component.- Specified by:
configuration
in interfacePacketParser<ClientPacket>
- Returns:
- the value of the
configuration
record component
-
play
Returns the value of theplay
record component.- Specified by:
play
in interfacePacketParser<ClientPacket>
- Returns:
- the value of the
play
record component
-