feat(conquistas): view any player's titles, /perfil card, wearable title tag

Extend the achievements module from self-only to a full RPG-status layer,
all still chat-only and derived from vanilla stats.

- /conquistas [jogador]: look up anyone's earned titles, offline included,
  computed from their stats on disk via the new OfflineStats.achievementStats
  (same keys the online snapshot uses, so identical Achievement conditions).
- /perfil [jogador]: a status card — headline stats, titles earned, worn title.
- /titulo [nome|limpar]: pick which earned title to wear; only earned ones are
  accepted and tab-completed. Stored per player in titulos.yml (Titles).
- TitleChatListener: an AsyncChat renderer that prefixes the chosen "[Título]"
  chip, for Java and Bedrock alike; gated on the conquistas module.

Tests: TitlesTest covers title selection and the offline stat-key contract.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Marcos Paulo
2026-08-11 12:17:24 -03:00
parent c54c6b22b3
commit 29000c208b
7 changed files with 375 additions and 11 deletions
+10 -2
View File
@@ -87,9 +87,17 @@ commands:
usage: /mortes
aliases: [minhasmortes]
conquistas:
description: Lista as conquistas e marca as que você já desbloqueou.
usage: /conquistas
description: Lista as conquistas e marca as que você (ou outro jogador) já desbloqueou.
usage: /conquistas [jogador]
aliases: [conquista]
perfil:
description: Mostra o perfil de um jogador — estatísticas, conquistas e título.
usage: /perfil [jogador]
aliases: [status]
titulo:
description: Escolhe qual conquista você exibe como título no chat.
usage: /titulo [nome|limpar]
aliases: [titulos, title]
permissions:
# Declared explicitly: an undeclared Bukkit permission falls back to op-only,