Skip to content

feat(minestom): expose the rank badge for other modules - #59

Merged
hbrombeer merged 1 commit into
mainfrom
feat/rank-badge-api
Oct 24, 2026
Merged

hbrombeer merged 1 commit into
mainfrom
feat/rank-badge-api

Conversation

@hbrombeer

Copy link
Copy Markdown
Member

Adds a public RankBadges service (registered next to Permissions in the module ServiceRegistry) so other Minestom modules can show the same rank badge chip the tab list and name tags use.

  • RankBadges.badge(playerId, viewerId): RankBadge? — highest role (same rule as name tags), Java chip or Bedrock chip depending on the viewer.
  • RankBadge(component, name, color) — colour falls back to #F3F0EA.
  • Badge internals stay internal; the edition roster is shared with the name tags.

Used by plugin-lobby's sidebar ("Rang mit Logo").

Register a RankBadges service next to Permissions so modules like the
lobby sidebar can show the same rank chip the tab list and nameplates
use. It resolves the player's highest role and returns the bare chip
(Java font badge, or the Bedrock atlas glyph for Bedrock viewers) along
with the role's display name and colour for a text fallback. The badge
internals stay internal.
@hbrombeer
hbrombeer merged commit 61097b4 into main Oct 24, 2026
2 checks passed
@hbrombeer
hbrombeer deleted the feat/rank-badge-api branch October 24, 2026 18:36
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