join_game_event holds args inside itself
This commit is contained in:
parent
db01f5d5b7
commit
6d64973c54
2 changed files with 6 additions and 1 deletions
|
@ -8,3 +8,8 @@ class JoinGameEvent(BaseEvent):
|
||||||
dimension : Dimension
|
dimension : Dimension
|
||||||
difficulty : Difficulty
|
difficulty : Difficulty
|
||||||
gamemode : Gamemode
|
gamemode : Gamemode
|
||||||
|
|
||||||
|
def __init__(self, dimension:Dimension, difficulty:Difficulty, gamemode:Gamemode):
|
||||||
|
self.gamemode = gamemode
|
||||||
|
self.difficulty = difficulty
|
||||||
|
self.dimension = dimension
|
|
@ -79,7 +79,7 @@ class GameState(Scaffold):
|
||||||
self.difficulty.name,
|
self.difficulty.name,
|
||||||
self.gamemode.name
|
self.gamemode.name
|
||||||
)
|
)
|
||||||
self.run_callbacks(JoinGameEvent, self.dimension, self.difficulty, self.gamemode)
|
self.run_callbacks(JoinGameEvent(self.dimension, self.difficulty, self.gamemode))
|
||||||
await self.dispatcher.write(
|
await self.dispatcher.write(
|
||||||
PacketSettings(
|
PacketSettings(
|
||||||
self.dispatcher.proto,
|
self.dispatcher.proto,
|
||||||
|
|
Loading…
Reference in a new issue