0x40 S40PacketDisconnect
Kicks the player from the server during gameplay with a JSON chat component reason message.
Fields
| Field | Type | Description |
|---|---|---|
| reason | IChatComponent (JSON) | Kick/disconnection reason displayed to the player |
Wire Encoding
| Field | Type | Notes |
|---|---|---|
| Reason | Chat Component (JSON) | JSON-serialized IChatComponent |
MCP References
MCP
NetHandlerPlayClient.handleDisconnect()Handler Interface
HND
INetHandlerPlayClientNotes
This is the PLAY-state disconnect (vs S00PacketDisconnect for LOGIN). When received, the client immediately closes the network connection and displays the disconnect screen with the reason.
implementation Implementation Cases
AutoReconnect
(Tenacity 5.1, Gugustus)
Detect disconnect/kick. AutoReconnect reconnects. AntiKick cancels.
if (event.getPacket() instanceof S40PacketDisconnect) {
event.setCancelled(true);
AutoReconnect.reconnect();
}AntiKick
(Tenacity 5.1, Gugustus)
Detect disconnect/kick. AutoReconnect reconnects. AntiKick cancels.
if (event.getPacket() instanceof S40PacketDisconnect) {
event.setCancelled(true);
AutoReconnect.reconnect();
}NameProtect
(Tenacity 5.1, Gugustus)
Detect disconnect/kick. AutoReconnect reconnects. AntiKick cancels.
if (event.getPacket() instanceof S40PacketDisconnect) {
event.setCancelled(true);
AutoReconnect.reconnect();
}