From 4dc52225236d1856b56e6db43932d0c170a3b642 Mon Sep 17 00:00:00 2001 From: alemidev Date: Wed, 24 Nov 2021 16:53:18 +0100 Subject: [PATCH] set as not in-game on disconnect --- treepuncher/treepuncher.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/treepuncher/treepuncher.py b/treepuncher/treepuncher.py index b544b5d..4ad703f 100644 --- a/treepuncher/treepuncher.py +++ b/treepuncher/treepuncher.py @@ -109,6 +109,10 @@ class Treepuncher(MinecraftClient): ) def _register_handlers(self): + @self.on_disconnected() + async def on_disconnected(): + self.in_game = False + @self.on_packet(PacketRespawn) async def on_player_respawning(packet:PacketRespawn): self.gamemode = Gamemode(packet.gamemode)