Skip to content

feat: add a hidden /tfmc credits listing the staff, helpers and extra credits - #60

Draft
XxFran10xX wants to merge 2 commits into
mainfrom
feat/tfmc-credits
Draft

XxFran10xX wants to merge 2 commits into
mainfrom
feat/tfmc-credits

Conversation

@XxFran10xX

@XxFran10xX XxFran10xX commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

What

  • /tfmc credits lists everyone holding a global group on the staff and helper+/helper LuckPerms tracks: on duty or not, offline players too. Each player appears once, under their highest section. After that come the extra lines and a footer.
  • Hidden on purpose: credits is not in the Brigadier tree, so it is never suggested, tab-completed or listed. TFMCCore answers the typed command in PlayerCommandPreprocessEvent (LOWEST) and cancels it before the tree sees it. This also covers /tfmccore:tfmc credits.
  • Former members stay: credits-roster.yml remembers everyone the command has listed and the highest section they reached, so staff and helpers who step down stay in.
  • Members: found with a LuckPerms storage search (UserManager#searchAll per track group). Groups held only in a server context, expired groups and negated groups don't count. Names use the server's last-seen spelling (with capitals); otherwise LuckPerms' stored name. Results are cached for credits.cache-seconds (300). If LuckPerms is unavailable, the remembered names and the extra lines still show, and the next use tries again.
  • Config: a new credits: section in tfmc.yml. Section titles use the TAB rank colours and the header uses the TAB header colours. Existing servers keep their tfmc.yml, so the section has to be added to the live file.

Tests

  • TfmcCommandTest:
    • the typed-command match
    • not visible in the tree, even to staff
    • deduplication, exclude, cache
    • former members kept in their highest section
    • LuckPerms failure
    • defaults
    • roster save and reload
  • BukkitTfmcActionsCoverageTest:
    • one entry per player across groups
    • server-only, expired and negated groups ignored
    • name fallback
    • missing track, no LuckPerms
  • Full suite: 914 tests, 0 failures.

🤖 Generated with Claude Code

… credits

/tfmc credits shows everyone holding a global group on the staff and helper LuckPerms tracks (on
duty or not, offline players too, each once under their highest section), then the extra lines from
tfmc.yml credits.extra (licence credits such as the OGA-BY music by ISAo). It is deliberately kept
out of the Brigadier tree, so it is never suggested, tab-completed or listed; TFMCCore answers the
typed command in PlayerCommandPreprocessEvent before the tree sees it. Members come from a LuckPerms
storage search, cached for credits.cache-seconds (300).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 11, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@github-actions github-actions Bot added the size:L 100-499 effective changed lines (tests excluded in mixed PRs). label Nov 11, 2026
…o links

- credits-roster.yml remembers everyone the credits listed and the highest section they reached,
  so staff and helpers who step down stay in (credits.exclude drops someone for good).
- Section titles use the TAB rank colours (Staff #f1c40f, Helper #ff00cc) and the header the TAB
  header colours; names are joined with credits.separator in credits.name format; a footer line
  closes the list. The music credit has no link.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 effective changed lines (tests excluded in mixed PRs).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant