Play Strawberry Docs
Scripts

Scoreboards and teams

Manage objectives, scores, display slots and teams without overwriting another feature.

Choose the client handle

JavaPlayer::get_scoreboard and BedrockPlayer::get_scoreboard return different scoreboard resources. Java objectives use a TextComponent display name, a RenderType and an optional NumberFormat (Blank or Fixed(text)); Bedrock objectives use string names and a sort order. reset_scoreboard puts the player back on the world scoreboard.

Objectives and scores

Use add_objective, update_objective, set_display_slot, update_score, add_score and the matching remove functions. Use your own objective names and send only values that changed.

Teams

The Java scoreboard supports teams, their settings and members. The SDK adds TeamSettingsBuilder, Team, ScoreboardTeamExt (register_new_team, get_team_handle, get_all_teams) and PlayerTeamExt (get_team_name). Check names and keep member lists bounded.

Cleanup

Remove only the objectives and teams you created. Do not clear another script's scoreboard or reset a player's display unless your feature owns it. Test replacement, disconnect and reconnect on each client.

Set them with player.set_tab_list_header_footer or server.broadcast_tab_list_header_footer. Bedrock's player list has no header and no footer:

  • A Bedrock player reads them on the server's page of their Settings screen, titled "Player list", as they are when they open the screen.
  • When your script opens its own page there (the extension event ADVANCEMENTS_OPENED), that page is shown instead.
  • Rewriting the header often costs Bedrock players nothing.

On this page