fix(protection): restore cleared Leaf effects
Release / release (push) Successful in 2m7s
CI / build (push) Successful in 1m1s

This commit is contained in:
dmg
2026-08-10 23:09:54 -04:00
parent 5609a0a656
commit 320c8ce193
9 changed files with 110 additions and 4 deletions
+8
View File
@@ -95,3 +95,11 @@
- Opt-out, combat, administrative disablement, and global disablement remove both Leaf-managed effects while conservatively preserving distinct external effects.
- Minecraft calculates the initiating PvP hit before Leaf can process the damage event, so that first hit can include the configured Strength bonus before automatic opt-out.
- Verified settings, runtime reconciliation, status, combat cleanup, persistence, command compatibility, autocomplete, and the complete build with `./gradlew clean check jar`.
### Automatic effect recovery added
- Leaf now reconciles opted-in online players every 20 ticks so death, milk, commands, and plugins cannot permanently clear configured protection.
- Recovery remains disabled for opted-out players and while Leaf is globally disabled.
- A temporary external Resistance or Strength effect is preserved instead of overwritten; the leaf prefix remains visible and Leaf restores its configured effect after the external effect ends.
- Added regression coverage for the one-second recovery task and eligibility-aware online-player reconciliation.
- Verified the complete build with `./gradlew clean check jar`.