set as not in-game on disconnect
This commit is contained in:
parent
da707e8904
commit
4dc5222523
1 changed files with 4 additions and 0 deletions
|
@ -109,6 +109,10 @@ class Treepuncher(MinecraftClient):
|
||||||
)
|
)
|
||||||
|
|
||||||
def _register_handlers(self):
|
def _register_handlers(self):
|
||||||
|
@self.on_disconnected()
|
||||||
|
async def on_disconnected():
|
||||||
|
self.in_game = False
|
||||||
|
|
||||||
@self.on_packet(PacketRespawn)
|
@self.on_packet(PacketRespawn)
|
||||||
async def on_player_respawning(packet:PacketRespawn):
|
async def on_player_respawning(packet:PacketRespawn):
|
||||||
self.gamemode = Gamemode(packet.gamemode)
|
self.gamemode = Gamemode(packet.gamemode)
|
||||||
|
|
Loading…
Reference in a new issue