Added Scoreboard Query Function - #56
Conversation
|
Hello, is this Repo still maintained? |
|
Holy yes please add this. I sent an email a while ago asking about the scoreboard. |
|
Yea I submitted this PR in Late December and still havent heard back, idk if maxuser looks at the PR's, did you get an answer to your mail? |
|
sorry for the late response. Unfortunately no response. |
|
Please update https://github.com/maxuser0/minescript/blob/main/test/minescript_test.py Also, please give more detail in the commit description with an example like you did at the start of this comment thread. |
maxuser0
left a comment
There was a problem hiding this comment.
This can go into the next beta, 5.0b12.
| `ScoreboardData` with objective name, display name, and list of entries, | ||
| or `None` if no scoreboard is displayed on the sidebar. | ||
|
|
||
| Since: v5.1 |
There was a problem hiding this comment.
v5.0 is still in beta, so please change to: Since: v5.0
| `ScoreboardData` with objective name, display name, and list of entries, | ||
| or `None` if no scoreboard is displayed on the sidebar. | ||
|
|
||
| Since: v5.1 |
| @@ -0,0 +1,18 @@ | |||
| // SPDX-FileCopyrightText: © 2022-2025 Greg Christiana <maxuser@minescript.net> | |||
There was a problem hiding this comment.
Please update the copyright year to 2026.
| @@ -0,0 +1,18 @@ | |||
| // SPDX-FileCopyrightText: © 2022-2025 Greg Christiana <maxuser@minescript.net> | |||
Expose get_scoreboard() in the Python and Pyjinn APIs. The query returns the sidebar objective name, display name, and entries in descending score order, including each entry's rendered display text. Example result: ScoreboardData(objective_name='player-SB', display_name='PVP CLUB', entries=[ScoreboardEntry(name='line0', score=1, display_name='mcpvp.club')]) Add an integration test covering empty sidebars and the returned scoreboard data shape.
7b2cc38 to
8406e03
Compare
# Conflicts: # common/src/main/resources/system/lib/minescript.py # common/src/main/resources/system/pyj/minescript.py
|
Should be ready |
I added the function: get_scoreboard(), which gets the current content of the scoreboard, this is an example output recorded one mcpvp.club:
ScoreboardData(objective_name='{MINECRAFT_USERNAME}-SB', display_name='PVP CLUB', entries=[ScoreboardEntry(name='§a§5§b§0§r', score=9, display_name=' '), ScoreboardEntry(name='§a§5§b§1§r', score=8, display_name='â\udc8fº {MINECRAFT_USERNAME} (EU)'), ScoreboardEntry(name='§a§5§b§2§r', score=7, display_name=' '), ScoreboardEntry(name='§a§5§b§3§r', score=6, display_name='Use 🗡 to queue,'), ScoreboardEntry(name='§a§5§b§4§r', score=5, display_name='or /duel to duel.'), ScoreboardEntry(name='§a§5§b§5§r', score=4, display_name=' '), ScoreboardEntry(name='§a§5§b§6§r', score=3, display_name='⌚ 12/29/2025'), ScoreboardEntry(name='§a§5§b§7§r', score=2, display_name='→ eu-spawn6 (80ms)'), ScoreboardEntry(name='§a§5§b§8§r', score=1, display_name=' '), ScoreboardEntry(name='§a§5§b§9§r', score=0, display_name='mcpvp.club')])
It looks pretty cursed, but that is the content of the scoreboard, with the colors and everything.