EndstoneMC / endstone

Endstone - High-level Plugin API for Bedrock Dedicated Servers (BDS), in both Python and C++.
http://endstone.dev/
Apache License 2.0
263 stars 23 forks source link

[bug] Can't get player scoreboard value correctly #78

Closed Monarchdos closed 1 month ago

Monarchdos commented 1 month ago

Describe the bug Can't get player scoreboard value correctly!

To Reproduce board = args[0].strip('"') objective = self.server.scoreboard.get_objective(board) score = objective.get_score(sender.name) sender.send_message(f"{score.value}") self.logger.info(f"Score: player={sender.name}, objective={objective.name}, value={score.value}, is_set={score.is_score_set}")

Screenshots 2024-10-14_14-09-33

Details (please complete the following information):

pgrd1 commented 1 month ago

Try using sender instead of sender.name