From c0f698ac7d545d3b3862643f89a682b5f2ce5f7f Mon Sep 17 00:00:00 2001 From: alemidev Date: Tue, 19 Apr 2022 03:51:02 +0200 Subject: [PATCH] oops run the events --- src/treepuncher/game/state.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/treepuncher/game/state.py b/src/treepuncher/game/state.py index b5fcb9b..c10cd07 100644 --- a/src/treepuncher/game/state.py +++ b/src/treepuncher/game/state.py @@ -79,7 +79,7 @@ class GameState(Scaffold): self.difficulty.name, self.gamemode.name ) - self.run_callbacks(JoinGameEvent(self.dimension, self.difficulty, self.gamemode)) + self.run_callbacks(JoinGameEvent, JoinGameEvent(self.dimension, self.difficulty, self.gamemode)) await self.dispatcher.write( PacketSettings( self.dispatcher.proto, @@ -99,7 +99,7 @@ class GameState(Scaffold): self.hp = packet.health self.food = packet.food + packet.foodSaturation if died: - self.run_callbacks(DeathEvent.SENTINEL) + self.run_callbacks(DeathEvent, DeathEvent()) self.logger.info("Dead, respawning...") await asyncio.sleep(0.5) await self.dispatcher.write(