[PR #2454] [MERGED] Show score components in /tellraw and /title #4330

Closed
opened 2026-11-03 04:16:24 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/2454
Author: @kacpherek
Created: 10/26/2026
Status: ✅ Merged
Merged: 10/27/2026
Merged by: @ludovic111

Base: main ← Head: fix/score-text-components


📝 Commits (2)

  • f9b8b40 Show score components in /tellraw and /title
  • bab4251 Give armor stands, frames, paintings, boats, carts and other entities a scoreboard name

📊 Changes

2 files changed (+65 additions, -4 deletions)

View changed files

📝 crates/horizon-client/src/game/commands/text_commands.rs (+55 -2)
📝 crates/horizon-client/src/game/scoreboard.rs (+10 -2)

📄 Description

What and why

/tellraw and /title (title, subtitle, actionbar) showed nothing for a score component, for example {"score":{"name":"Steve","objective":"kills"}}. They now show the holder's score.

The name is read like vanilla: a selector that matches one entity is that entity, a selector that matches none is used as a plain name, and more than one match fails with "Only one entity is allowed". * is the player the command runs for. The value uses the score's number format, then the objective's, then plain.

Vanilla reference

ScoreContents.resolve, findTargetName and getScore.

Self-check

cargo check -p horizon-client passes.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/2454 **Author:** [@kacpherek](https://github.com/kacpherek) **Created:** 10/26/2026 **Status:** ✅ Merged **Merged:** 10/27/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/score-text-components` --- ### 📝 Commits (2) - [`f9b8b40`](https://github.com/horizon-rust/horizon/commit/f9b8b40a7dfd59ed5877c2333d8e43afcf8a6484) Show score components in /tellraw and /title - [`bab4251`](https://github.com/horizon-rust/horizon/commit/bab42517154cead302186e24fd9dfd1b62b98ae3) Give armor stands, frames, paintings, boats, carts and other entities a scoreboard name ### 📊 Changes **2 files changed** (+65 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/commands/text_commands.rs` (+55 -2) 📝 `crates/horizon-client/src/game/scoreboard.rs` (+10 -2) </details> ### 📄 Description ## What and why `/tellraw` and `/title` (title, subtitle, actionbar) showed nothing for a `score` component, for example `{"score":{"name":"Steve","objective":"kills"}}`. They now show the holder's score. The name is read like vanilla: a selector that matches one entity is that entity, a selector that matches none is used as a plain name, and more than one match fails with "Only one entity is allowed". `*` is the player the command runs for. The value uses the score's number format, then the objective's, then plain. ## Vanilla reference `ScoreContents.resolve`, `findTargetName` and `getScore`. ## Self-check `cargo check -p horizon-client` passes. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:16:24 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#4330
No description provided.