feat(ignis): add earned Dagger crafting and safe blinking
Release / release (push) Successful in 2m36s
CI / build (push) Successful in 1m12s

This commit is contained in:
dmg committed 2026-09-10 22:55:00 -04:00
1 parent 183b6660b2
commit 17b61d7b43
29 files changed
+1402 -62

No files matched your search

+28 -6
View File
@@ -1,6 +1,6 @@
# Spigot Ignis
Server-wide earned shadow progression for Social Minecraft. **Echo of the Abyss, advancement-name scrambling, and The Mask are implemented in source; live-server/client verification is pending.** Dagger and Heart gameplay are not implemented yet.
Server-wide earned shadow progression for Social Minecraft. **Echo of the Abyss, advancement-name scrambling, The Mask, and The Dagger are implemented in source; live-server/client verification is pending.** Heart gameplay is not implemented yet.
## Build
@@ -24,7 +24,7 @@ CI/release workflows publish versioned source artifacts; verify their exact run/
- `StateService.open(repository)` loads on a dedicated persistence worker and completes only when ready. Failed/corrupt loads do not substitute empty state. No caller may use gameplay state before successful initialization.
- `snapshot()` provides an immutable, last-successfully-saved view. `update(pureChange)` serializes mutations, saves first, then publishes/acknowledges. Mutation functions run off-thread and must not access Bukkit or perform gameplay side effects. Marshal downstream gameplay work back to the server thread.
- `configure(invisibilityMillis, pearls, darknessMillis)` validates positive thresholds and atomically saves limits with resulting unlocks. Defaults are 43,200,000 ms (12 h), 313 pearls, and 21,600,000 ms (6 h). Lower limits unlock satisfied tracks during evaluation; higher limits do not revoke unlocks. VOID is objective-based and is excluded from numeric threshold grants.
- UUID state includes per-track progress, unlock/activation flags, invalidation generations, pending rewards, and issued-item receipts. Echo validity requires a matching owner, receipt, and generation; reset removes relevant receipts and advances the generation. Future tradable-item provenance remains a later design decision.
- UUID state includes per-track progress, unlock/activation flags, invalidation generations, pending rewards, and issued-item receipts. Echo validity requires a matching owner, receipt, and generation; reset removes relevant receipts and advances the generation. Mask/Dagger validity additionally requires the holder's personal unlock and the issuer's matching track receipt/generation.
- `close()` rejects new mutations and lets already queued writes drain without blocking the caller. Hard process termination can lose unacknowledged updates. The worker does not force Bukkit/world access from its thread.
Bootstrap reads only `plugins/SpigotIgnis/state.bin`; it does not read or migrate Stealth data. Listeners, commands, and pending-delivery retries register only after successful asynchronous initialization. Runtime limits have a Java service API and admin commands; there is no hand-edited configuration file.
@@ -53,9 +53,31 @@ A crafter's generation can share a recipe receipt across multiple legitimately p
Wearing a valid Mask applies managed invisibility. Effect ownership is established only when this plugin's application actually takes effect; external replacements revoke ownership, so unequipping/resetting removes only Ignis's contribution. ProtocolLib projects only the helmet slot to air for eligible invisible wearers and restores equipment presentation when eligibility changes. Other armor and server inventory contents are not mutated by projection. Actual self/other-player rendering and inventory-screen behavior remain manual acceptance checks.
## The Dagger
The default unlock is **313 consumed ender-pearl throws**, configurable through `limits set pearls`. A launch event alone does not count: the adapter correlates the pending pearl launch with its decreased item-stack mirror and the subsequent vanilla `USE_ITEM` notification. Cancelled launches, unsuccessful spawns without that notification, unconsumed/free throws, unrelated statistics, and duplicate notifications earn nothing. Cancelling the statistic update itself does not undo a pearl already consumed. This does not read or import players' vanilla statistic totals. Exact Purpur event ordering and servers/plugins suppressing those notifications remain live-verification requirements.
Counts save off-thread, with in-memory retry of failed credit. Checkpoints wait for reserved writes rather than acknowledging early; reset generations discard stale buffers. Administrative counter edits drain old credits before applying the requested value. Shutdown drains the pearl tracker before closing the persistence worker. Unacknowledged credit cannot be guaranteed through a hard crash or unavailable storage.
The authenticated Ominous Key is named **The Dagger**. Its unchanged recipe is:
| | | |
| --- | --- | --- |
| Heart of the Sea | Heavy Core | Heart of the Sea |
| Nether Star | Ominous Key | Nether Star |
| Heart of the Sea | Dragon Egg | Heart of the Sea |
Dagger crafting uses the same durable issuance policy as the Mask: vanilla retains ingredient consumption, locked/reset outputs and automated Crafters are denied, and pending admin gifts are not used as paid-craft receipts. `TradableRewards` shares the ledger rules without changing existing Mask PDC identities or schema version. Both issuer and holder need their own unlock; issuer reset invalidates traded copies.
Right-click normally attempts **three blocks along the aim direction**. A visible player within **eight blocks** and a **three-dimensional 15-degree half-angle** cone instead selects a destination **1.5 horizontal blocks behind their facing direction**. Closest-to-crosshair selection uses UUID order for ties. Invisible/vanished, dead, and spectator targets are excluded. The user's look orientation is retained. Line-of-sight queries first check that their chunk corridor is loaded.
A valid attempt starts a **two-second per-player cooldown**, shared across copies, even if unsafe or cancelled. Further attempts do not extend it. A blocked selected destination does not fall back to a different teleport. Item-use vetoes are respected, while vanilla's default denied block interaction with air does not suppress custom item use. Authenticated keys are prevented from being consumed as vanilla vault keys, including revoked copies.
Safety uses the player's current bounding box, a continuous sweep against block collision shapes (including neighboring protruding shapes), a supported exit, world/build boundaries, and conservative liquid/hazard rejection. It does not sample past thin walls or load missing chunks. Work is capped at 32,768 candidate block cells; extreme body sizes/routes can be refused. Unsupported mid-air exits and campfire/hazard surfaces are conservatively refused. Native `Player.teleport(..., PLUGIN)` preserves the normal protection/cancellation event path and leaves the reusable item intact. Actual terrain, scaled/posed player collisions, and protection-plugin behavior still require live tests.
## Commands
All players may use `/ignis umbra` to privately see the three item tracks. The Mask counter is active; Dagger/Heart natural counters and items remain unimplemented, though administrator-seeded values can be inspected. No passive progress UI is added.
All players may use `/ignis umbra` to privately see the three item tracks. Mask and Dagger counters are active; Heart natural progression and its item remain unimplemented, though administrator-seeded values can be inspected. No passive progress UI is added.
Administration requires **`ignis.admin`** (default: operators), checked independently during execution and autocomplete:
@@ -65,12 +87,12 @@ Administration requires **`ignis.admin`** (default: operators), checked independ
/ignisadmin limits set <mask-ms|pearls|darkness-ms> <positive-value>
/ignisadmin progress <set|add> <online-name|known-UUID> <mask|dagger|heart> <nonnegative-value>
/ignisadmin complete <online-name|known-UUID> void
/ignisadmin give <online-name|known-UUID> <echo|mask>
/ignisadmin give <online-name|known-UUID> <echo|mask|dagger>
/ignisadmin reset <online-name|known-UUID> <void|mask|dagger|heart|all>
/ignisadmin reset <online-name|known-UUID> <void|mask|dagger|heart|all> confirm
```
Reset confirmation must match the same sender, target, and tracks within 30 seconds; `confirm` alone cannot bypass the initial request. Reset clears the selected progress/unlocks/activation, pending rewards and issuance receipts, and advances generation, making old Echo copies invalid even after re-earning. Other tracks are unchanged by a single-track reset. Echo grants unlock eligibility but still require consumption to activate scrambling; already activated players do not gain another activation. Admin Mask grants unlock use and queue the authenticated item for delivery after profile resolution/inventory availability. Admin mutations are audited, not routine private progress reads.
Reset confirmation must match the same sender, target, and tracks within 30 seconds; `confirm` alone cannot bypass the initial request. Reset clears the selected progress/unlocks/activation, pending rewards and issuance receipts, and advances generation, making old Echo copies invalid even after re-earning. Other tracks are unchanged by a single-track reset. Echo grants unlock eligibility but still require consumption to activate scrambling; already activated players do not gain another activation. Admin Mask/Dagger grants unlock use and queue authenticated items for inventory-ready delivery; new Masks also require profile resolution. Mask/Dagger delivery retries remember an already offered gift while its acknowledgement save is failing, so trading it away does not cause another offer in the same plugin session. This marker is not durable across process restart; failed-acknowledgement/restart recovery still requires operator review. Admin mutations are audited, not routine private progress reads.
Offline targets use UUIDs already present in Ignis state; online exact names are resolved without network profile lookups. Commands and contextual completion do not claim that unimplemented reward items are available.
@@ -88,4 +110,4 @@ JUnit tests exercise real temporary-file persistence, serialized writes, fault i
Live Purpur startup/shutdown, event sequencing, item appearance/consumption, inventory durability across hard crashes, protections, and Stealth/client compatibility still require a manual smoke test. Minecraft inventory persistence and this plugin's state file are not a single atomic transaction: a hard crash between item delivery and Minecraft saving inventory needs operator recovery review. If disconnect/death happens during activation, the durable benefit can commit before the physical item is removed; any retained copy is inert, not another usable unlock. These limitations prevent claiming complete live/crash acceptance or deploying automatically.
Before a later approved production release, test: void damage/elytra/End Stone success and all interruption paths; other players and lookalikes failing activation; full inventory and failed saves; logout/death during activation; reset/re-earn invalidation; all advancement types and hover/click content with Stealth; admin permission/confirmation/offline UUID cases; direct-drink attribution after reconnect/restart and external effect replacement; skin outages; manual/shift/Crafter ingredient protection; tradable Mask issuer/holder resets; own/other-player helmet rendering, inventory interactions, and preservation of external invisibility.
Before a later approved production release, test: void damage/elytra/End Stone success and all interruption paths; other players and lookalikes failing activation; full inventory and failed saves; logout/death during activation; reset/re-earn invalidation; all advancement types and hover/click content with Stealth; admin permission/confirmation/offline UUID cases; direct-drink attribution after reconnect/restart and external effect replacement; skin outages; manual/shift/Crafter ingredient protection; tradable Mask issuer/holder resets; own/other-player helmet rendering, inventory interactions, and preservation of external invisibility; real consumed-pearl launch/statistic ordering; Dagger regular/shift/Crafter recipes, stale receipts, vault-key protection, target visibility, thin obstacles, scaled/posed bodies, hazardous/unsupported exits, world/chunk boundaries, cooldowns across copies/disconnect, and cancelled or redirected protection-plugin teleports.