public class PacketHandshakeIn extends InPacket
Modifier and Type | Field and Description |
---|---|
protected String |
address
Believed to stay as "localhost", more documentation required
|
protected int |
nextState
The next stage the client will be going into 1 for STATUS 2 for LOGIN
|
protected short |
port
Believed to be always "25565", more documentation required
|
protected int |
protocolVersion
Protocol version the client is running on
|
Constructor and Description |
---|
PacketHandshakeIn() |
Modifier and Type | Method and Description |
---|---|
Packet |
decode(ByteBuf buf)
Sets the fields of the packet from the data serialized into the buffer
|
PacketDirection |
direction()
Returns the packet direction
|
void |
handleReceived(ClientConnection connection)
Handles the packet after receiving it from a connection, is invoked by the ClientConnection that received it
|
int |
id()
Gets the ID of this packet, according to the protocol specification
|
protected int protocolVersion
protected short port
protected int nextState
public PacketHandshakeIn()
public Packet decode(ByteBuf buf)
Packet
buf
- the buffer storing the serialized packet datapublic int id()
Packet
public PacketDirection direction()
Packet
direction
in interface Packet
direction
in class InPacket
PacketDirection.IN
or
PacketDirection.OUT
depending on directionpublic void handleReceived(ClientConnection connection)
Used to allow the packet to notify the ClientConnection
of packets the server receives, and make changes specific to this packet
Nothing is done here
connection
- The connection that sent the packetCopyright © 2016. All rights reserved.