public class ServerLoginNetworkHandler extends Object implements ServerLoginPacketListener
Modifier and Type | Class and Description |
---|---|
(package private) static class |
ServerLoginNetworkHandler.State |
Modifier and Type | Field and Description |
---|---|
private static AtomicInteger |
authenticatorThreadId |
ClientConnection |
connection |
private static Logger |
LOGGER |
private int |
loginTicks |
private byte[] |
nonce |
private ServerPlayerEntity |
player |
private com.mojang.authlib.GameProfile |
profile |
private static Random |
RANDOM |
private SecretKey |
secretKey |
private MinecraftServer |
server |
private String |
serverId |
private ServerLoginNetworkHandler.State |
state |
Constructor and Description |
---|
ServerLoginNetworkHandler(MinecraftServer server,
ClientConnection connection) |
Modifier and Type | Method and Description |
---|---|
void |
acceptPlayer() |
void |
disconnect(Text reason) |
ClientConnection |
getConnection() |
String |
getConnectionInfo() |
void |
onDisconnected(Text reason) |
void |
onHello(LoginHelloC2SPacket packet) |
void |
onKey(LoginKeyC2SPacket packet) |
void |
onQueryResponse(LoginQueryResponseC2SPacket packet) |
void |
tick() |
protected com.mojang.authlib.GameProfile |
toOfflineProfile(com.mojang.authlib.GameProfile profile) |
private static final AtomicInteger authenticatorThreadId
private static final Logger LOGGER
private static final Random RANDOM
private final byte[] nonce
private final MinecraftServer server
public final ClientConnection connection
private ServerLoginNetworkHandler.State state
private int loginTicks
private com.mojang.authlib.GameProfile profile
private final String serverId
private SecretKey secretKey
private ServerPlayerEntity player
public ServerLoginNetworkHandler(MinecraftServer server, ClientConnection connection)
public void tick()
public ClientConnection getConnection()
getConnection
in interface PacketListener
public void disconnect(Text reason)
public void acceptPlayer()
public void onDisconnected(Text reason)
onDisconnected
in interface PacketListener
public String getConnectionInfo()
public void onHello(LoginHelloC2SPacket packet)
onHello
in interface ServerLoginPacketListener
public void onKey(LoginKeyC2SPacket packet)
onKey
in interface ServerLoginPacketListener
public void onQueryResponse(LoginQueryResponseC2SPacket packet)
onQueryResponse
in interface ServerLoginPacketListener
protected com.mojang.authlib.GameProfile toOfflineProfile(com.mojang.authlib.GameProfile profile)