0x40 S40PacketDisconnect

Kicks the player from the server during gameplay with a JSON chat component reason message.

Clientbound (Server → Client) · PLAY · net/minecraft/network/play/server/S40PacketDisconnect.java
playerdisconnectkick

Fields

FieldTypeDescription
reasonIChatComponent (JSON)Kick/disconnection reason displayed to the player

Wire Encoding

FieldTypeNotes
ReasonChat Component (JSON)JSON-serialized IChatComponent

MCP References

MCPNetHandlerPlayClient.handleDisconnect()

Handler Interface

HNDINetHandlerPlayClient

Notes

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.

Vanilla hook: EventReceivePacket
AntiKick (Tenacity 5.1, Gugustus)

Detect disconnect/kick. AutoReconnect reconnects. AntiKick cancels.

Vanilla hook: EventReceivePacket
NameProtect (Tenacity 5.1, Gugustus)

Detect disconnect/kick. AutoReconnect reconnects. AntiKick cancels.

Vanilla hook: EventReceivePacket
← Back to all packets