From 1c68c408c856229839e4cd411feb708fd4f02296 Mon Sep 17 00:00:00 2001 From: Vincent Date: Fri, 21 Jun 2024 12:32:25 +0100 Subject: [PATCH] feat: add more tests --- src/endstone_test/event_listener.py | 4 +++- src/endstone_test/plugin.py | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/endstone_test/event_listener.py b/src/endstone_test/event_listener.py index 282da9a..f81db77 100644 --- a/src/endstone_test/event_listener.py +++ b/src/endstone_test/event_listener.py @@ -58,7 +58,9 @@ def send_welcome_message(player_name: str) -> None: current_exp_lvl = event.player.exp_level event.player.give_exp_levels(2) assert event.player.exp_level == current_exp_lvl + 2 - assert 0.0 <= event.player.exp <= 1.0 + assert 0.0 <= event.player.exp_progress <= 1.0 + event.player.exp_level = current_exp_lvl + 1 + assert event.player.exp_level == current_exp_lvl + 1 @event_handler def on_player_death(self, event: PlayerDeathEvent): diff --git a/src/endstone_test/plugin.py b/src/endstone_test/plugin.py index 1f0d611..a21e6e8 100644 --- a/src/endstone_test/plugin.py +++ b/src/endstone_test/plugin.py @@ -71,5 +71,5 @@ def send_debug_message(self): f"Dimension: {player.location.dimension.name}\n" f"InWater: {player.is_in_water}, InLava: {player.is_in_lava}\n" f"OnGround: {player.is_on_ground}, MayFly: {player.allow_flight}, Flying: {player.is_flying}\n" - f"Exp: {player.exp}, Lv: {player.exp_level}" + f"Exp: {player.exp_progress}, Lv: {player.exp_level}, Total: {player.total_exp}" )