Skip to content

Replace /tfmc <track> promote|demote with /tfmc promote|demote - #49

Merged
ryanbarlow97 merged 3 commits into
mainfrom
feat/tfmc-promote-demote
Oct 15, 2026
Merged

ryanbarlow97 merged 3 commits into
mainfrom
feat/tfmc-promote-demote

Conversation

@ryanbarlow97

@ryanbarlow97 ryanbarlow97 commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

/tfmc promote and /tfmc demote now pick the track for the player. They act on the player's highest track: the last entry in helper-tracks that holds one of the player's own global LuckPerms groups. The default order is helper, helper+, staff. Each step is offered only when the player also holds that step's permission on that track.

The track is chosen by group membership rather than by permissions. The active helper+, staff_inactive and staff groups hold *, which matches every track's promote and demote permissions. A permission check would therefore send an on-duty helper+ to the staff track. As a further guard, a step never adds a player to a track they are not already on, whereas LuckPerms would otherwise add them to its first group.

The per-track /tfmc helper … and /tfmc helper+ … commands are removed. The default tfmc.yml adds a staff track (staff.promote / staff.demote), and the failure message no longer says "helper". Track edits now apply with /tcore reload tfmc; they used to need a restart.

Deployment notes: live tfmc.yml files need the staff entry added by hand. staff_player needs staff.promote; staff_inactive and staff already pass through *.

Tests: tfmc-mvn -o -B clean verify passes (100% line coverage gate).

🤖 Generated with Claude Code

The step now follows the player's highest track: the last one in
tfmc.yml whose promote or demote permission they hold. Adds the staff
track (staff.promote / staff.demote). Track changes no longer need a
restart because the command tree no longer depends on track names.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added the size:M 30-99 effective changed lines (tests excluded in mixed PRs). label Oct 15, 2026
@coderabbitai

coderabbitai Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 28 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 30d0c772-dd60-4cda-876c-01505c2b8d3c
📥 Commits

Reviewing files that changed from the base of the PR and between 10c3a6a and 77a12e7.

📒 Files selected for processing: 7
  • src/main/java/net/tfminecraft/tfmccore/tfmc/BukkitTfmcActions.java
  • src/main/java/net/tfminecraft/tfmccore/tfmc/TfmcActions.java
  • src/main/java/net/tfminecraft/tfmccore/tfmc/TfmcCommand.java
  • src/main/resources/tfmc.yml
  • src/test/java/net/tfminecraft/tfmccore/tfmc/BukkitTfmcActionsCoverageTest.java
  • src/test/java/net/tfminecraft/tfmccore/tfmc/BukkitTfmcActionsTest.java
  • src/test/java/net/tfminecraft/tfmccore/tfmc/TfmcCommandTest.java
  • 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

Comment @coderabbitai help to get the list of available commands.

Active helper+ and staff groups hold *, which matches every track's
permissions, so the highest track is now the last one holding one of
the player's own global groups. A step never adds a player to a track
they are not on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added size:L 100-499 effective changed lines (tests excluded in mixed PRs). and removed size:M 30-99 effective changed lines (tests excluded in mixed PRs). labels Oct 15, 2026
Track steps act on a user's normal data, so a transient group no longer
counts: stepping it would save it as permanent.

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

Copy link
Copy Markdown
Contributor Author

Reviewed by GPT-6.1-Sol (xhigh) in two rounds: round 1 found transient groups counting as track membership (fixed in 77a12e7), round 2 OK. CodeRabbit is rate-limited, so admin-merging.

@ryanbarlow97
ryanbarlow97 merged commit a999998 into main Oct 15, 2026
3 checks passed
@ryanbarlow97
ryanbarlow97 deleted the feat/tfmc-promote-demote branch October 15, 2026 15:02
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