Repository navigation
fix: use sender-aware completion for ban commands - #97
Merged
Merged
Conversation
Route ban targets, active ban names and duration presets through framework providers for console and player completion. Require UltiTools-API 6.4.0 and align metadata, docs and regression tests. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Member
Author
|
Cross-family code review (single review, Claude Opus) — head Result: no P1 or P2 findings. The 6.4.0 framework resolves all three new P3 findings and disposition:
F1–F4 and F6 go into a single fix commit (RED→GREEN test for F1); no confirmation review round follows. |
Keep duration suggestions on one mapping, assert exact candidates for both senders, and correct completion documentation and comments. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Member
Author
|
Gate 3 — real-machine UAT (local Codex)
|
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
BanCommand,TempBanCommandandUnbanCommandwith named, sender-aware@CmdParamproviders./banand/tempban; provide duration presets to console as well as players. Keep/unbanon distinct names from the module's active, unexpired ban records.api-version: 640, and align the README and metadata regression tests. UpdateFEATURES.mdandUAT-CHECKLIST.mdwith the completion behavior and acceptance cases.Closes #96
Refs UltiKits/UltiTools-Reborn#839
Validation
BanCompletionTestran 11 cases with 8 failures before the implementation change: console providers were not invoked and unauthorized players received candidates.mvn -B clean verify: 1,454 tests passed, 0 failures, 0 errors, 0 skipped.git diff --checkpasses.UAT: required — console/player tab-completion behavior is visible to operators; real-server acceptance remains pending.
Threat model
Normal operator completion from player, console and RCON senders, including missing command permissions, vanished targets, partial tokens and active module-ban records. Ban persistence, execution and vanilla ban lists are unchanged.
Known limitations
UltiTools-API 6.4.0 returns
nullwhen non-player completion has no candidates, allowing Bukkit's existing default online-name fallback. This module does not change that framework contract or claim to suppress it. The README, inventory and regression test explicitly preserve this case.Open questions
The minimum framework version rises from 6.3.0 to 6.4.0 so older frameworks reject this build instead of silently missing the sender-aware behavior. This compatibility-floor change must be accounted for when choosing the next module release version; the module's version is not bumped or released by this PR.
The bilingual developer-doc companion requested by UltiTools-Reborn#839 item 2 remains separate: document
TabCompletionContext.getSender(), nullablegetPlayer()for non-player requests, exactCommandSenderprovider signatures, silent permission/target filtering, and the non-player empty-candidate fallback.🤖 Generated with Claude Code
Review fixes
F1–F4, F6: remove duplicate duration candidates; correct RCON and API-version claims; clarify permission-completion observations and command-list refresh; restore English Javadoc.