public class ServerQueryNetworkHandler extends Object implements ServerQueryPacketListener
| Modifier and Type | Field and Description |
|---|---|
private ClientConnection |
connection |
private static Text |
REQUEST_HANDLED |
private boolean |
responseSent |
private MinecraftServer |
server |
| Constructor and Description |
|---|
ServerQueryNetworkHandler(MinecraftServer server,
ClientConnection connection) |
| Modifier and Type | Method and Description |
|---|---|
ClientConnection |
getConnection() |
void |
onDisconnected(Text reason) |
void |
onPing(QueryPingC2SPacket packet) |
void |
onRequest(QueryRequestC2SPacket packet) |
private static final Text REQUEST_HANDLED
private final MinecraftServer server
private final ClientConnection connection
private boolean responseSent
public ServerQueryNetworkHandler(MinecraftServer server, ClientConnection connection)
public void onDisconnected(Text reason)
onDisconnected in interface PacketListenerpublic ClientConnection getConnection()
getConnection in interface PacketListenerpublic void onRequest(QueryRequestC2SPacket packet)
onRequest in interface ServerQueryPacketListenerpublic void onPing(QueryPingC2SPacket packet)
onPing in interface ServerQueryPacketListener