Detect disconnection and exit the script

This commit is contained in:
tanner committed 2021-03-26 22:25:55 +00:00
1 parent e4b51aa2d6
commit f35c7a4e51
3 files changed
+20 -1

No files matched your search

+11
View File
@@ -447,3 +447,14 @@ class SelectTradePacket(Packet):
definition = [
{'selected_slot': VarInt},
]
class DisconnectPacket(Packet):
# Sent by the server before it disconnects a client
# https://wiki.vg/Protocol#Disconnect_.28play.29
id = 0x19
packet_name = 'disconnect'
definition = [
{'reason': String},
]