Only emit handler when disconnecting from the world servers

This commit is contained in:
rsakeys 2020-03-02 19:20:27 +00:00
parent c171c75cb3
commit 1dc3bf9f34

View File

@ -451,8 +451,9 @@ async def handle_wear_puffle(p, item_id: int):
@handlers.disconnected @handlers.disconnected
@handlers.player_attribute(client_type=ClientType.Legacy) @handlers.player_attribute(client_type=ClientType.Legacy)
async def handle_stop_walking(p): async def handle_stop_walking(p):
if p.walking: if p.joined_world:
await p.update(hand=None, walking=None).apply() if p.walking:
await p.update(hand=None, walking=None).apply()
@handlers.handler(XTPacket('p', 'pp'), client=ClientType.Vanilla) @handlers.handler(XTPacket('p', 'pp'), client=ClientType.Vanilla)