feat(tamer): release mobs after class loss
Release / release (push) Successful in 2m40s
CI / build (push) Successful in 1m13s

This commit is contained in:
dmg
2026-08-21 21:37:09 -04:00
parent 0b202f588d
commit 34f32cd32d
11 changed files with 309 additions and 0 deletions
@@ -22,6 +22,7 @@ As the **Tyrant**, I want to assign unlocked specialist classes so that I can bu
- [x] The Tyrant can assign and reassign purchased classes through the Tyrant control panel.
- [x] The control panel's player selector communicates eligibility and identifies the current class holder before confirmation.
- [x] Control-panel and command-based assignments enforce identical rules.
- [x] Removing or reassigning the Tamer class automatically releases the former holder's captured mobs while leaving ordinary inventory untouched.
## Related
@@ -21,6 +21,17 @@ As the **Tamer**, I want to capture a mob and release it elsewhere so that I can
- [x] Capture restrictions are configurable without permitting Ender Dragons.
- [x] Invalid placement, full inventory, death, logout, restart, plugin disable, containers, and concurrent interaction cannot lose or duplicate a mob.
- [x] Stored mob data is validated defensively before spawning and cannot execute untrusted serialized behavior.
- [x] When a player loses the Tamer class, every captured mob in their custody is automatically released at the former Tamer's location.
- [x] Ordinary inventory items are not dropped or changed during automatic release.
- [x] Each captured-mob item and custody record is removed only after its mob spawns successfully.
- [x] Multiple captured mobs are released without duplicating entities or custody records.
- [x] If the former Tamer is offline or no safe release location is available, release is deferred without losing the captured mob.
- [x] A deferred release is retried when the former Tamer next logs in or reaches a safe location.
- [x] Tyrant death, class reassignment, opt-out, administration, and other Tamer-removal paths use the same release behavior.
## Validation
Automated tests verify that only former Tamers are processed, offline custody remains deferred, successful releases remove only their corresponding custody records, and failed releases remain available for retry. The complete `./gradlew clean check jar` lifecycle passes.
## Related