public class PacketLoginOutDisconnect extends Object implements Packet
Modifier and Type | Field and Description |
---|---|
protected String |
jsonMessage
Disconnect message, represented JSON
|
Constructor and Description |
---|
PacketLoginOutDisconnect() |
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 |
encode(ByteBuf buf)
Serialized the data held by this packet into a buffer
|
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
|
String |
jsonMessage() |
Packet |
setJsonMessage(String jsonMessage) |
protected String jsonMessage
public PacketLoginOutDisconnect()
public int id()
Packet
public PacketDirection direction()
Packet
direction
in interface Packet
PacketDirection.IN
or
PacketDirection.OUT
depending on directionpublic void encode(ByteBuf buf)
Packet
public void handleReceived(ClientConnection connection)
Packet
Used to allow the packet to notify the ClientConnection
of packets the server receives, and make changes specific to this packet
handleReceived
in interface Packet
connection
- The connection that sent the packetpublic String jsonMessage()
public Packet setJsonMessage(String jsonMessage)
Copyright © 2016. All rights reserved.