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 Dowsing, including the current prefix and applicable permission or sender context.
DOW-01: Root commands, saved resource IDs and yield presets match the current token case-insensitively; exact command tokens stay in their root slot until a trailing space. Terminal arguments return explicit empty lists.
DOW-02: Resource type completion uses distinct loaded NodeType.getResource labels, preserving configured case and reflecting reloads. Removed usage placeholders; new IDs remain free text.
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
New Features
Command suggestions now include resource creation and deletion options, resource names, and valid yield values.
Suggestions are filtered by the text entered so far, with case-insensitive matching.
Bug Fixes
Unsupported commands and unavailable suggestions now return an empty list instead of no result.
Suggestions are limited to administrators; player-specific options are shown only to players.
Tab completion now filters suggestions by the current token, uses loaded node types for resource names, and returns empty lists when suggestions do not apply. Tests cover filtering, sender permissions, and resource suggestions.
Changes: Tab completion
Layer / File(s)
Summary
Completion filtering and suggestions src/main/java/net/tfminecraft/dowsing/utils/TabCompletion.java, src/test/java/net/tfminecraft/dowsing/managers/CommandAndResourceTest.java
The completion handler filters suggestions case-insensitively and applies command and sender restrictions. Resource creation suggests loaded resource names and yield values; resource deletion suggests IDs from .txt files. Tests cover these behaviours and empty results.
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 Dowsing, including the current prefix and applicable permission or sender context.
DOW-01: Root commands, saved resource IDs and yield presets match the current token case-insensitively; exact command tokens stay in their root slot until a trailing space. Terminal arguments return explicit empty lists.DOW-02: Resource type completion uses distinct loaded NodeType.getResource labels, preserving configured case and reflecting reloads. Removed usage placeholders; new IDs remain free text.DOW-03: Authorized console senders can complete reload; create/delete descendants remain player-only.Validation:
tfmc-mvn -o -B --no-transfer-progress clean verifypassed (222 tests, zero failures/errors; 0 skips), including command-completion regressions.git diff --checkpassed.Documentation: TF-Minecraft/Docs#266.