set as not in-game on disconnect

This commit is contained in:
əlemi 2021-11-24 16:53:18 +01:00
parent da707e8904
commit 4dc5222523

View file

@ -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)