Files
spigot-leaf/design/log.md
T

52 lines
3.6 KiB
Markdown

# Leaf Design Log
## 2026-08-10
### Initial protection design
- Leaf is available to any player who opts in; the seven-day period applies only to onboarding reminders.
- Protection grants Resistance I by default and remains active until the player opts out, attacks another player, an administrator disables it for the player, or Leaf is globally disabled.
- Receiving an attack does not remove protection, but retaliating does, including attributable Thorns damage.
- PvP attribution covers melee, projectiles, potions, owned animals, Thorns, and indirect damage when Spigot exposes a reliable responsible player.
- Opted-in players receive a leaf prefix in tab, overhead names, and chat where supported.
- New players receive an onboarding reminder on every login for seven calendar days after first joining.
- Global disablement suppresses effects, prefixes, and reminders without erasing player choices.
- Administration uses the permission-aware `/leaf` command tree with autocomplete.
- Builds and releases follow the neighboring Spigot Base Gradle and Gitea pipeline.
- The design bundle is committed together; later implementation work is committed separately for each user story.
### Implementation started
- Established the Java 17 Gradle project, strict compilation, JUnit test lifecycle, Leaf plugin metadata, Gradle wrapper, and Gitea CI and semantic-release workflows.
- Verified the initial pipeline with `./gradlew clean check jar` and produced `build/libs/leaf-0.1.0-SNAPSHOT.jar`.
- US-007 remains in progress until the story-by-story implementation commit requirement has been verified.
### Configuration and persistence checkpoint
- Added validated settings with Resistance I and seven-day onboarding defaults.
- Added defensive UUID-keyed YAML player state with RFC 3339 timestamps, forward-field preservation, and atomic replacement where supported.
- Added safe plugin initialization and periodic dirty-state persistence.
- US-006 remains in progress pending live runtime setting commands and Leaf effect ownership behavior.
### US-001 player protection completed
- Added permission-aware player commands with idempotent choice changes and detailed status reporting.
- Added immediate durable opt-in persistence, join-time restoration, and quiet infinite Resistance reconciliation.
- Leaf tracks its live Resistance fingerprint and conservatively preserves a visibly distinct Resistance effect.
- Verified player choice, lock, persistence, command, autocomplete, and build behavior with `./gradlew clean check jar`.
### US-003 identity presentation checkpoint
- Added configurable, color-compatible prefixes to standard chat display names and player-list names.
- Added conservative main-scoreboard team prefixes for overhead names without displacing unrelated teams.
- Name cleanup restores only values Leaf installed; third-party changes are preserved.
- Documented scoreboard, custom chat, tab-list, and per-viewer scoreboard limitations.
- US-003 remains in progress until combat and global administration paths are verified.
### US-002 combat opt-out completed
- Added modern Spigot damage-source attribution for direct attacks, projectiles, thrown potions, area clouds, tamed animals, TNT, Thorns, and other reliably attributed sources.
- Ambiguous, cancelled, zero-damage, environmental, and self damage do not opt out a player.
- Combat opt-out bypasses administrative locks, immediately reconciles effect and prefix state, persists once, and sends one explanatory message.
- Verified attribution, victim safety, lock bypass, duplicate suppression, and the full build with `./gradlew clean check jar`.