feat(commands): add permission-aware tab completion
Release / release (push) Successful in 2m30s
CI / build (push) Successful in 1m18s

This commit is contained in:
dmg
2026-08-10 22:22:08 -04:00
parent 1d580220c3
commit b4a8094874
9 changed files with 229 additions and 10 deletions
+1 -1
View File
@@ -36,7 +36,7 @@ For explosions, player damage events establish whether an unlocked player would
## Commands and configuration
`/creeperaura` exposes player progress and permission-protected offline administration. Rank requirements, multipliers, feedback duration, and messages are loaded from YAML. Valid command-based changes are written back to YAML and survive restart.
`/creeperaura` exposes player progress and permission-protected offline administration. Permission-aware tab completion suggests available subcommands, online players, and valid ranks without querying SQLite on the server thread. Rank requirements, multipliers, feedback duration, and messages are loaded from YAML. Valid command-based changes are written back to YAML and survive restart.
## Verification
+4
View File
@@ -6,6 +6,10 @@ description: Chronological record of material changes to the Spigot Creeper Fear
# Design Log
## 2026-08-10
- Completed US-008 with permission-aware command, online-player, and rank tab completion.
## 2026-08-08
- Established the OKF v0.1 design bundle.
+1
View File
@@ -13,3 +13,4 @@ description: Catalog of user stories for the Spigot Creeper Fear plugin.
- [US-005: Administer player progression](us-005-administer-player-progression.md)
- [US-006: Configure aura progression](us-006-configure-aura-progression.md)
- [US-007: Build and release the plugin](us-007-build-and-release-plugin.md)
- [US-008: Autocomplete commands](us-008-autocomplete-commands.md)
@@ -0,0 +1,31 @@
---
type: User Story
title: "US-008: Autocomplete commands"
description: Help players and administrators discover valid Creeper Aura command arguments with permission-aware tab completion.
status: done
---
# US-008: Autocomplete commands
As a **command sender**, I want Creeper Aura commands to offer relevant tab completions so that I can enter valid commands quickly and accurately.
## Acceptance criteria
- [x] `/creeperaura` suggests only subcommands allowed by the sender's permissions.
- [x] `progress`, `set`, `add`, and `rank` suggest matching online player names where appropriate.
- [x] `rank` suggests `locked`, `I`, `II`, `III`, `IV`, `V`, and `VI`.
- [x] `threshold` suggests configurable ranks `I` through `VI`.
- [x] Suggestions are filtered case-insensitively by the current input.
- [x] Unauthorized administrative subcommands and arguments are not suggested.
- [x] Completion works for both players and the server console.
- [x] Automated tests cover completion behavior.
- [x] Command metadata and project documentation describe autocomplete support.
Offline stored players remain valid command targets but are not suggested, avoiding synchronous database access during completion.
## Related
- [Check personal progress](us-004-check-personal-progress.md)
- [Administer player progression](us-005-administer-player-progression.md)
- [Configure aura progression](us-006-configure-aura-progression.md)
- [User-story catalog](index.md)