You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Correct command suggestions to match the arguments accepted by ActivityTF, including the current prefix and applicable permission or sender context.
ACTIVITY-01: Complete online and known previously played offline names only while the offline name remains in the same Bukkit cache used by execution. Startup enumeration and joins maintain names; completion makes no blocking profile lookups. Regression covers cache expiry and renamed accounts.
ACTIVITY-02: Each root action is checked against its actual permission, including activity.admin=true with activity.check=false.
Validation: tfmc-mvn -o -B --no-transfer-progress clean verify passed (961 tests, zero failures, errors or skips), including command-completion regressions. git diff --check passed.
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.
📝 Summary
Summary by CodeRabbit
Improvements
Command suggestions now include subcommands available to the player, while continuing to respect permissions.
Player-name suggestions include online players and previously seen players still available in the server’s cached records.
Suggestions match without regard to letter case and reflect a player’s updated name after they join.
ActivityCommand now tracks previously known player names, updates them on player joins, and offers cached names in player-argument tab completion. Tab completion also filters subcommands by the sender’s permission.
Changes: Player name completion
Layer / File(s)
Summary
Track known player names src/main/java/net/tfminecraft/activitytf/ActivityCommand.java, src/main/java/net/tfminecraft/activitytf/ActivityPlugin.java, src/test/java/net/tfminecraft/activitytf/ActivityPluginTest.java
ActivityCommand loads names from previously played offline players and updates them on player joins. ActivityPlugin loads the names and registers ActivityCommand as a listener. Startup tests verify listener registration.
Suggest permitted commands and player names src/main/java/net/tfminecraft/activitytf/commands/ActivityCommand.java, src/test/java/net/tfminecraft/activitytf/commands/ActivityCommandTest.java
Tab completion filters subcommands by permission and combines online names with known names still present in Bukkit’s offline-player cache. Tests cover case-insensitive matching, renamed players, excluded names and permission filtering.
This change makes command tab completion suggest permitted subcommands and known player names. No actionable merge-blocking risk was found in the supplied context.
- [ ] 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
size:M30-99 effective changed lines (tests excluded in mixed PRs).
1 participant
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Correct command suggestions to match the arguments accepted by ActivityTF, including the current prefix and applicable permission or sender context.
ACTIVITY-01: Complete online and known previously played offline names only while the offline name remains in the same Bukkit cache used by execution. Startup enumeration and joins maintain names; completion makes no blocking profile lookups. Regression covers cache expiry and renamed accounts.ACTIVITY-02: Each root action is checked against its actual permission, including activity.admin=true with activity.check=false.Validation:
tfmc-mvn -o -B --no-transfer-progress clean verifypassed (961 tests, zero failures, errors or skips), including command-completion regressions.git diff --checkpassed.Documentation: TF-Minecraft/Docs#266.