diff --git a/src/endstone_test/event_listener.py b/src/endstone_test/event_listener.py index eeb418e..5376954 100644 --- a/src/endstone_test/event_listener.py +++ b/src/endstone_test/event_listener.py @@ -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.") diff --git a/src/endstone_test/tests/on_player_join/test_player.py b/src/endstone_test/tests/on_player_join/test_player.py index 7127f97..1411338 100644 --- a/src/endstone_test/tests/on_player_join/test_player.py +++ b/src/endstone_test/tests/on_player_join/test_player.py @@ -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