Skip to content

Feat/scoreboard enhancements - #430

Merged
twisti-dev merged 2 commits into
version/26.2from
feat/scoreboard-enhancements
Sep 23, 2026
Merged

twisti-dev merged 2 commits into
version/26.2from
feat/scoreboard-enhancements

Conversation

@twisti-dev

Copy link
Copy Markdown
Contributor

No description provided.

- implement viewer line that displays player health in the scoreboard
- introduce new utility functions for building dynamic and static lines
- refactor scoreboard definition to support viewer-specific components
@twisti-dev twisti-dev self-assigned this Sep 23, 2026
Copilot AI lite review requested due to automatic review settings September 23, 2026 07:55
@twisti-dev
twisti-dev merged commit b5e262b into version/26.2 Sep 23, 2026
8 checks passed
@twisti-dev
twisti-dev deleted the feat/scoreboard-enhancements branch September 23, 2026 07:58

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

One or more issues must be addressed before approval.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 High severity

Open (1)
What changed in this PR

Enhances the Paper scoreboard API with viewer-specific rendering and component-builder helpers, backed by Folia-aware per-player scheduling.

Changes:

  • Adds viewer-specific lines/components and builder extensions.
  • Refactors scoreboard lifecycle and automatic updates for per-viewer sidebars.
  • Updates tests and version to 3.45.0.
File Description
surf-api-paper/​surf-api-paper/​src/​main/​kotlin/​dev/​slne/​surf/​api/​paper/​scoreboard/​SurfScoreboardBuilder.kt Updated as part of this pull request.
surf-api-paper/​surf-api-paper/​src/​main/​kotlin/​dev/​slne/​surf/​api/​paper/​scoreboard/​SurfScoreboard.kt Updated as part of this pull request.
surf-api-paper/​surf-api-paper/​src/​main/​kotlin/​dev/​slne/​surf/​api/​paper/​scoreboard/​scoreboard-extensions.kt Updated as part of this pull request.
surf-api-paper/​surf-api-paper/​api/​surf-api-paper.api Updated as part of this pull request.
surf-api-paper/​surf-api-paper-server/​src/​main/​kotlin/​dev/​slne/​surf/​api/​paper/​server/​impl/​scoreboard/​SurfScoreboardImpl.kt Updated as part of this pull request.
surf-api-paper/​surf-api-paper-server/​src/​main/​kotlin/​dev/​slne/​surf/​api/​paper/​server/​impl/​scoreboard/​SurfScoreboardBuilderImpl.kt Updated as part of this pull request.
surf-api-paper/​surf-api-paper-server/​src/​main/​kotlin/​dev/​slne/​surf/​api/​paper/​server/​impl/​scoreboard/​SurfAutoUpdatableScoreboardImpl.kt Updated as part of this pull request.
surf-api-paper/​surf-api-paper-server/​src/​main/​kotlin/​dev/​slne/​surf/​api/​paper/​server/​impl/​scoreboard/​SurfAutoUpdatablePlayerScoreboardImpl.kt Updated as part of this pull request.
surf-api-paper/​surf-api-paper-server/​src/​main/​kotlin/​dev/​slne/​surf/​api/​paper/​server/​impl/​scoreboard/​ScoreboardLine.kt Updated as part of this pull request.
surf-api-paper/​surf-api-paper-plugin-test/​src/​main/​java/​dev/​slne/​surf/​api/​paper/​test/​command/​subcommands/​scoreboard/​CreateScoreboard.java Updated as part of this pull request.
gradle.properties Updated as part of this pull request.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

sidebarComponentBuilder.build(),
animations
lines.toList(),
snapshots.toList(),

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 78c37ca9c4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 29 to +31
override fun addUpdatableLine(line: Supplier<Component>) = apply {
sidebarComponentBuilder.addDynamicLine(line)
val snapshot = LineSnapshot(line::get).also { snapshots.add(it) }
addShared { drawable -> drawable.drawLine(snapshot.value) }

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Give each built scoreboard its own line snapshots

When one builder containing an updatable line is used to build multiple scoreboards, this closure and snapshots.toList() retain the same mutable LineSnapshot instance in every result. The scoreboards have separate locks, so concurrent updates can overwrite one another's snapshot between refresh and draw, causing one scoreboard to display another scoreboard's supplier result. Create the snapshots and the components that capture them per definition()/build instead of sharing them through the builder.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 23, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-23T08:04:51.201937Z 78c37ca PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants