feat(config): add validated persistent state
Release / release (push) Failing after 12s
CI / build (push) Successful in 47s

This commit is contained in:
dmg
2026-08-08 13:15:21 -04:00
parent 152cac0740
commit e646d12863
19 changed files with 639 additions and 12 deletions
+7
View File
@@ -26,3 +26,10 @@ description: Chronological record of significant Trigger Spawn design decisions.
- Added the Java 17 Gradle project targeting Spigot API 26.2, with JUnit 5 verification and versioned resource processing.
- Added Gitea CI and semantic-release workflows modeled on `spigot-event-producer`.
- Documented local builds, public releases, and the required `RELEASE_TOKEN` repository secret.
## 2026-08-08 — Configuration and persistence
- Added validated, independently configurable real-time cooldown tiers with documented defaults.
- Added atomic YAML persistence for UUID-based player access state and per-world spawn settings.
- Invalid persisted access values fail closed, while invalid required configuration disables the plugin rather than allowing partial startup.
- Added friendly duration formatting and the administrative permission declaration.
@@ -2,7 +2,7 @@
type: User Story
title: "US-006: Configure plugin behavior"
description: Let operators tune cooldown tiers and run the plugin with clear validation, messages, permissions, and durable state.
status: backlog
status: done
---
# US-006: Configure plugin behavior
@@ -11,17 +11,17 @@ As a **server operator**, I want safe configuration and durable state so that Tr
## Acceptance criteria
- [ ] The one-kill cooldown is independently configurable and defaults to 28,800 seconds.
- [ ] The two-kill cooldown is independently configurable and defaults to 14,400 seconds.
- [ ] The three-kill cooldown is independently configurable and defaults to 3,600 seconds.
- [ ] Configured cooldowns must be positive and representable safely by the plugin.
- [ ] Invalid required configuration prevents partial initialization and produces a clear server log message.
- [ ] Player-facing messages use clear built-in wording, readable colors, and friendly duration formatting.
- [ ] Ordinary players do not require a plugin permission node to execute `/spawn`; eligibility is controlled by progression, grants, cooldowns, and bans.
- [ ] Administrative commands require `triggerspawn.admin`.
- [ ] Server operators receive `triggerspawn.admin` by default.
- [ ] Boss progress, grants, bans, cooldown timestamps, latest known names, and per-world spawn settings persist across clean restarts.
- [ ] Persisted data is handled defensively so corrupt or invalid records do not silently grant access.
- [x] The one-kill cooldown is independently configurable and defaults to 28,800 seconds.
- [x] The two-kill cooldown is independently configurable and defaults to 14,400 seconds.
- [x] The three-kill cooldown is independently configurable and defaults to 3,600 seconds.
- [x] Configured cooldowns must be positive and representable safely by the plugin.
- [x] Invalid required configuration prevents partial initialization and produces a clear server log message.
- [x] Player-facing messages use clear built-in wording, readable colors, and friendly duration formatting.
- [x] Ordinary players do not require a plugin permission node to execute `/spawn`; eligibility is controlled by progression, grants, cooldowns, and bans.
- [x] Administrative commands require `triggerspawn.admin`.
- [x] Server operators receive `triggerspawn.admin` by default.
- [x] Boss progress, grants, bans, cooldown timestamps, latest known names, and per-world spawn settings persist across clean restarts.
- [x] Persisted data is handled defensively so corrupt or invalid records do not silently grant access.
## Related