diff --git a/src/endstone_test/event_listener.py b/src/endstone_test/event_listener.py index 5fbae2e..2b9264f 100644 --- a/src/endstone_test/event_listener.py +++ b/src/endstone_test/event_listener.py @@ -48,8 +48,8 @@ def on_player_join(self, event: PlayerJoinEvent) -> None: assert event.player.has_permission("minecraft.command.me") is False event.player.update_commands() - event.player.allow_flight = True - assert event.player.allow_flight is True + # event.player.allow_flight = True + # assert event.player.allow_flight is True current_exp_lvl = event.player.exp_level event.player.give_exp_levels(2) diff --git a/src/endstone_test/tests/test_scoreboard.py b/src/endstone_test/tests/test_scoreboard.py index 4b90c5e..8d48dd0 100644 --- a/src/endstone_test/tests/test_scoreboard.py +++ b/src/endstone_test/tests/test_scoreboard.py @@ -51,3 +51,17 @@ def test_list_objectives(server: Server, scoreboard: Scoreboard) -> None: objective = scoreboard.get_objective("test_objective") assert objective is not None assert objective in scoreboard.objectives + + +def test_scoreboard_value(server: Server, scoreboard: Scoreboard) -> None: + server.dispatch_command(server.command_sender, "scoreboard objectives add test_objective dummy") + objective = scoreboard.get_objective("test_objective") + assert objective is not None + + server.dispatch_command(server.command_sender, "scoreboard players set test_player test_objective 3") + score = objective.get_score("test_player") + assert score.is_score_set + assert score.value == 3 + + score = objective.get_score("non_existent_player") + assert not score.is_score_set