feat(commands): view and set online player heights
Release / release (push) Successful in 2m54s
CI / build (push) Successful in 1m2s

This commit is contained in:
dmg
2026-09-06 20:05:41 -04:00
parent e802319f45
commit f011410b17
15 changed files with 380 additions and 16 deletions
+12
View File
@@ -6,6 +6,18 @@ description: Chronological record of material decisions affecting Spigot Heights
# Spigot Heights Design Log
## 2026-09-07T00:00:54Z — Player-height commands completed
- Added `/heights player <name> [scale]` for exact online-player lookup, base/effective scale reporting, immediate saved changes, and permission-protected name/size completion.
- Command-set scales honor live limits and the exact `1.0` restoration exception. The player-state store now publishes cached changes only after successful persistence, and commands save before applying scale.
- Verified `./gradlew clean check jar`: all 33 tests passed, including permissions, input validation, completions, scale reporting, reload, and failed-save protection. Inspected Bukkit lookup/attribute and join/respawn wiring; live-server/client verification remains unperformed.
- Updated README and completed US-008 and related US-004/US-007 criteria.
## 2026-09-06T23:54:36Z — Player-height commands approved and started
- Approved [US-008](user-stories/us-008-manage-player-height.md): `/heights player <name> [scale]` for online players, admin permissions, tab completion, and UUID persistence.
- Values follow current min/max bounds with the exact `1.0` exception; failed saves must not change cached or live player height.
## 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.
+1
View File
@@ -13,3 +13,4 @@ description: Catalog of user stories for the Spigot Heights plugin.
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)
8. [US-008: View and set player height](us-008-manage-player-height.md)
@@ -21,8 +21,12 @@ As a **server operator**, I want validated stature and launcher settings with du
- [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.
- [x] Command-set player heights persist by UUID under existing reload rules; failed saves do not publish a new cached or live height.
## Related
- [US-008: View and set player height](us-008-manage-player-height.md)
- [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)
@@ -19,12 +19,18 @@ As a **server administrator**, I want commands with tab completion so that I can
- [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.
- [x] Command help and completion include the player-height subcommand without changing existing min/max command behavior.
## Verification
- Player-command extension verified with `./gradlew clean check jar` (33 passing tests), including existing settings-command regressions and new player-name/size completions.
- `./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-008: View and set player height](us-008-manage-player-height.md)
- [US-004: Configure and persist stature behavior](us-004-configure-and-persist.md)
- [US-006: Restore default stature](us-006-restore-default-stature.md)
@@ -0,0 +1,30 @@
---
type: User Story
title: "US-008: View and set player height"
description: Let administrators inspect and persistently set online player scales through tab-completed commands.
status: done
---
# US-008: View and set player height
As a **server administrator**, I want to view and set a player's height so that I can manage individual stature without potions.
## Acceptance criteria
- [x] `/heights player <name>` reports the online player's scale, where `1.0` is normal size.
- [x] `/heights player <name> <scale>` immediately applies and saves the scale by UUID for reconnects and respawns.
- [x] Operators and senders with `spigotheights.admin` can use the commands, including console and targeting themselves.
- [x] Tab completion suggests online player names and valid example sizes, filtered by prefix; unauthorized senders receive no suggestions.
- [x] Values must be finite and within current configured limits, except exact `1.0` is always allowed as the restoration exception.
- [x] Invalid input, unknown/offline players, and persistence failures produce clear messages; failed saves do not change live or cached player height.
- [x] Automated tests and README documentation cover viewing, setting, permissions, completion, validation, and persistence.
## Verification
- `./gradlew clean check jar` passed all 33 tests. Coverage includes command routing and permissions, completion, base/effective scale reporting, live limits, the restoration exception, UUID reload, and failed-save protection for live/cached/disk state.
- Code inspection confirms exact online lookup, scale-attribute access, shared storage with join/respawn handlers, and command registration. No live-server/client test was performed.
## Related
- [US-004: Configure and persist stature behavior](us-004-configure-and-persist.md)
- [US-007: Manage stature settings with commands](us-007-manage-settings-commands.md)