Skip to content

✨ feat(MessageFormatter): enhance name formatting to support teleport… - #129

Open
TheBjoRedCraft wants to merge 1 commit into
version/26.1from
feat/new-format
Open

TheBjoRedCraft wants to merge 1 commit into
version/26.1from
feat/new-format

Conversation

@TheBjoRedCraft

Copy link
Copy Markdown
Contributor

…ation and improve message display

@TheBjoRedCraft TheBjoRedCraft self-assigned this Sep 21, 2026
Copilot AI lite review requested due to automatic review settings September 21, 2026 14:16

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

The new name-click teleport mechanism routes through /tp (name-based, command-dependent) instead of the existing UUID-based teleport abstraction, and several public-facing API conveniences were removed/changed without compatibility safeguards.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 4 Medium severity

Open (4)
What changed in this PR

This PR updates chat message rendering so sender names can optionally become teleport targets and message hover details are simplified to show timestamp + plain text, with the change applied consistently across Paper and Minestom formatters.

Changes:

  • Extend appendName with an allowTeleport flag and update platform formatters to use it.
  • Replace the previous hover payload (appendMessageData) with a simpler timestamp + plain message hover in global formatting.
  • Minor UI tweaks (delete icon/tooltip) and bump version to 4.5.16.
File Description
surf-chat-paper/​src/​main/​kotlin/​dev/​slne/​surf/​chat/​paper/​util/​components.kt Updates Paper appendName(Player, …) wrapper to forward teleport capability.
surf-chat-paper/​src/​main/​kotlin/​dev/​slne/​surf/​chat/​paper/​message/​MessageFormatter.kt Uses new name formatting + adjusts separators and hover payload for global messages.
surf-chat-minestom/​src/​main/​kotlin/​dev/​slne/​surf/​chat/​minestom/​message/​MinestomMessageFormatter.kt Mirrors the Paper global formatting updates for Minestom.
surf-chat-core/​surf-chat-core-client/​src/​main/​kotlin/​dev/​slne/​surf/​chat/​core/​client/​message/​format/​common-format.kt Implements teleport-capable name formatting and tweaks delete UI.
gradle.properties Bumps project version.

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

append {
append(MiniMessage.miniMessage().deserialize(prefix + name))
if (allowTeleport) {
clickRunsCommand("/tp $name")

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.

Es gibt keinen tp command auf minestom deswegen war das vorher über das callback

Also so ungefähr

clickEvent(ClickEvent.callback { clicked ->

            val who = clicked.uuidOrNull() ?: return@callback

            ChatPlatform.teleportToPlayer(who, teleportTarget)

        })

This branch has not been deployed

No deployments
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.

3 participants