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
@@ -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)