Skip to content

Commit

Permalink
fix: upstream api changes
Browse files Browse the repository at this point in the history
  • Loading branch information
wu-vincent committed Sep 5, 2024
1 parent 7943b0e commit b4e2f26
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/endstone_test/event_listener.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ def on_player_quit(self, event: PlayerQuitEvent) -> None:
def on_player_teleport(self, event: PlayerTeleportEvent):
self._plugin.logger.info(f"{event.player.name} teleported from {event.from_location} to {event.to_location}")

@event_handler
def on_player_death(self, event: PlayerDeathEvent):
event.death_message = ColorFormat.RED + event.death_message

@event_handler
def on_actor_death(self, event: ActorDeathEvent):
self._plugin.logger.info(f"{event.actor.name} died.")
Expand Down
2 changes: 1 addition & 1 deletion src/endstone_test/tests/on_player_join/test_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def test_player_game_mode(player: Player):
def test_player_scoreboard(player: Player, server: Server):
assert player.scoreboard is server.scoreboard

new_scoreboard = server.get_new_scoreboard()
new_scoreboard = server.create_scoreboard()
player.scoreboard = new_scoreboard
assert player.scoreboard is new_scoreboard
assert player.scoreboard is not server.scoreboard
Expand Down

0 comments on commit b4e2f26

Please sign in to comment.