public class McpeClient extends Client
Client.CloseReason
Modifier and Type | Field and Description |
---|---|
static int |
LOGIN_STEP_IN_GAME |
static int |
LOGIN_STEP_WAIT_CONNECT |
static int |
LOGIN_STEP_WAIT_HANDSHAKE |
static int |
LOGIN_STEP_WAIT_REQUEST_1 |
static int |
LOGIN_STEP_WAIT_REQUEST_2 |
Constructor and Description |
---|
McpeClient(McpeProtocol protocol,
UdpSessionHandler session) |
Modifier and Type | Method and Description |
---|---|
void |
close(Client.CloseReason closeReason) |
int |
getLoginStep() |
McpeProtocol |
getProtocol() |
RakNetInterface |
getRakNetInterface() |
UdpSessionHandler |
getSession() |
SessionHandler |
getSessionHandler() |
Protocol |
getSourceProtocol() |
void |
handleDataPacket(ByteBuffer buffer) |
void |
handlePacket(ByteBuffer buffer) |
McpeClient |
setLoginStep(int loginStep) |
void |
tick() |
void |
unexpectedPacket(RawDataPacket packet) |
void |
unexpectedPacket(ReceivedPacket packet) |
getAddress, getAssignedPlayer, getLastAlive, getPingStats, refreshActive
public static final int LOGIN_STEP_WAIT_REQUEST_1
public static final int LOGIN_STEP_WAIT_REQUEST_2
public static final int LOGIN_STEP_WAIT_CONNECT
public static final int LOGIN_STEP_WAIT_HANDSHAKE
public static final int LOGIN_STEP_IN_GAME
@ConstructorProperties(value={"protocol","session"}) public McpeClient(@NonNull McpeProtocol protocol, UdpSessionHandler session)
public Protocol getSourceProtocol()
getSourceProtocol
in class Client
public SessionHandler getSessionHandler()
getSessionHandler
in class Client
public void handlePacket(ByteBuffer buffer)
handlePacket
in class Client
public void handleDataPacket(ByteBuffer buffer)
public void close(Client.CloseReason closeReason)
public void unexpectedPacket(ReceivedPacket packet)
public void unexpectedPacket(RawDataPacket packet)
@NonNull public McpeProtocol getProtocol()
public UdpSessionHandler getSession()
public RakNetInterface getRakNetInterface()
public int getLoginStep()
public McpeClient setLoginStep(int loginStep)
Copyright © 2016. All rights reserved.