feat(commands): manage height bounds with tab completion
This commit is contained in:
@@ -6,6 +6,18 @@ description: Chronological record of material decisions affecting Spigot Heights
|
||||
|
||||
# Spigot Heights Design Log
|
||||
|
||||
## 2026-09-06T23:51:22Z — Settings commands completed
|
||||
|
||||
- Added `/heights settings` and `/heights set min|max <value>` with `spigotheights.admin` (default op), generic sender support, and prefix-filtered tab completion of valid example values.
|
||||
- Validated changes are persisted through temporary-file replacement (atomic where supported) before activating shared live settings. Unrelated YAML values are preserved; malformed files and write failures do not activate new limits.
|
||||
- Updated gameplay listeners to read current settings without immediately resizing players or resetting launcher cooldowns.
|
||||
- Verified `./gradlew clean check jar`: all 26 tests passed. Inspected command registration and event wiring; live-server/client verification remains unperformed. Completed US-007 and the related US-004 change.
|
||||
|
||||
## 2026-09-06T23:45:28Z — Settings commands approved and started
|
||||
|
||||
- Approved [US-007](user-stories/us-007-manage-settings-commands.md): permission-protected min/max commands, tab completion, validation, and persistent live updates.
|
||||
- Existing players are not resized immediately; subsequent gameplay reads current limits. The exact `1.0` restoration exception remains intact.
|
||||
|
||||
## 2026-09-06T23:41:16Z — Restoration completed
|
||||
|
||||
- Added the white Potion of Restoration with persistent identity and the approved Sugar upgrade recipe.
|
||||
|
||||
@@ -12,3 +12,4 @@ description: Catalog of user stories for the Spigot Heights plugin.
|
||||
4. [US-004: Configure and persist stature behavior](us-004-configure-and-persist.md)
|
||||
5. [US-005: Build and release the plugin](us-005-build-and-release.md)
|
||||
6. [US-006: Restore default stature](us-006-restore-default-stature.md)
|
||||
7. [US-007: Manage stature settings with commands](us-007-manage-settings-commands.md)
|
||||
|
||||
@@ -19,8 +19,10 @@ As a **server operator**, I want validated stature and launcher settings with du
|
||||
- [x] Missing state defaults safely to scale `1.0` clamped to the configured range.
|
||||
- [x] Saved out-of-range state is clamped before it is applied, except exact scale `1.0`, which is preserved for restoration.
|
||||
- [x] Configuration and state behavior have automated tests.
|
||||
- [x] Approved min/max commands validate and persist changes before publishing live settings to gameplay listeners, without immediately resizing players.
|
||||
|
||||
## Related
|
||||
|
||||
- [User-story catalog](index.md)
|
||||
- [US-007: Manage stature settings with commands](us-007-manage-settings-commands.md)
|
||||
- [US-006: Restore default stature](us-006-restore-default-stature.md)
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
---
|
||||
type: User Story
|
||||
title: "US-007: Manage stature settings with commands"
|
||||
description: Let administrators view and persistently change stature bounds with tab-completed commands.
|
||||
status: done
|
||||
---
|
||||
|
||||
# US-007: Manage stature settings with commands
|
||||
|
||||
As a **server administrator**, I want commands with tab completion so that I can change stature limits without restarting the server.
|
||||
|
||||
## Acceptance criteria
|
||||
|
||||
- [x] `/heights settings` displays current settings; `/heights set min|max <value>` changes the selected bound.
|
||||
- [x] Operators and senders with `spigotheights.admin` may use the commands, including console; unauthorized senders cannot change settings or receive suggestions.
|
||||
- [x] Tab completion suggests subcommands, `min`/`max`, and valid example values, filtered by the typed prefix.
|
||||
- [x] Successful changes apply immediately to gameplay and persist to `plugins/SpigotHeights/config.yml` without discarding unrelated configuration.
|
||||
- [x] Invalid arguments or settings produce clear explanations and leave active and saved settings unchanged; persistence failure does not activate the new settings.
|
||||
- [x] Existing players are not immediately resized; subsequent potion use, joins, and respawns use current limits, preserving the restoration exception for `1.0`.
|
||||
- [x] Automated tests and README documentation cover commands, permissions, completion, validation, persistence, and live settings.
|
||||
|
||||
## Verification
|
||||
|
||||
- `./gradlew clean check jar` passed all 26 tests, including command execution with authorized/unauthorized generic senders, prefix-filtered valid completions, argument validation, failed saves, YAML reload/preservation, and live domain behavior.
|
||||
- Code inspection confirms command/permission registration and shared settings suppliers in consumption, join, respawn, and launcher adapters. No live-server command or client tab-completion test was performed.
|
||||
|
||||
## Related
|
||||
|
||||
- [US-004: Configure and persist stature behavior](us-004-configure-and-persist.md)
|
||||
- [US-006: Restore default stature](us-006-restore-default-stature.md)
|
||||
Reference in New Issue
Block a user