Skip to content

feat(chat): show the player head before the prefix in chat - #138

Merged
TheMeinerLP merged 6 commits into
mainfrom
feat/chat-player-head
Oct 6, 2026
Merged

TheMeinerLP merged 6 commits into
mainfrom
feat/chat-player-head

Conversation

@TheMeinerLP

Copy link
Copy Markdown
Contributor

Summary

  • Chat lines formatted by Butterfly now start with the sender's player head (object component), then a space, the prefix and name, : and the message, on Paper and Minestom.
  • The head carries the skin textures from the Paper profile / Minestom Player#getSkin(); without textures it is sent with UUID and name only. Names Adventure rejects as head names (e.g. Bedrock names with spaces) are omitted so chat never fails.
  • New setting butterfly.chat.head.enabled (default true), added to both bundled default-config.yaml files; invalid values fall back to the default with a warning.
  • Display name, tab list name and team prefix are unchanged. The head is built once per message and composed through the new pure ChatLine/PlayerHeads helpers in api.

OpenSpec

  • Archives replace-togglz-with-avaje-config and restrict-chat-tags-by-permission.
  • Adds add-player-head-to-chat.
  • Records the manual Paper test results of the two archived changes.

Tests

  • PlayerHeadsTest (5), ChatLineTest (4), 3 new ButterflySettingsTest cases, Minestom chat/head/config tests; 143 tests in api and minestom in total.
  • ./gradlew build :minestom:smokeTest green.

Manual test

Paper 26.2, LuckPerms 5.5.71, ViaVersion/ViaBackwards 5.12.1, 26.2 client (build of 509a1fa):

  • config.yaml created on first start with all defaults (incl. chat.head.enabled), unchanged on second start (identical sha256).
  • Legacy flags.properties in the server root: one warning, ignored.
  • sort-format "%02d" gives team 01default; key removed with -Dbutterfly.format=%03d gives 001default; default gives 0001default.
  • Tags: without permissions <red>rot <click:run_command:/help>klick</click> stays literal; after lp group default permission set butterfly.chat.tag.color true the text is red and the <click> tag stays literal.
  • Head: shown before the [Test] prefix with the player's skin; with butterfly.chat.head.enabled: false there is no head and no leading space.

Before merge

  • Check the chat line with a client older than 1.21.9 via ViaBackwards and record what it shows.

https://claude.ai/code/session_01Wt7kcAoVtZTEALDSX4CxWF

@TheMeinerLP
TheMeinerLP requested a review from a team as a code owner October 5, 2026 20:06
@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

Test results

 38 files   38 suites   25s ⏱️
150 tests 150 ✅ 0 💤 0 ❌
300 runs  300 ✅ 0 💤 0 ❌

Results for commit e789b66.

@TheMeinerLP
TheMeinerLP merged commit 24ead74 into main Oct 6, 2026
9 of 11 checks passed
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.

1 participant