feat(quests): add quest creation and reward escrow
This commit is contained in:
@@ -33,3 +33,10 @@ description: Chronological record of material decisions affecting Spigot Quest B
|
||||
- Registered main-hand interactions open one shared native Purpur dialog while unregistered blocks remain untouched.
|
||||
- Persistence publishes a board only after an atomic YAML save succeeds and rejects duplicate locations.
|
||||
- Verified 11 tests and the plugin JAR with `./gradlew clean check jar`.
|
||||
|
||||
## 2026-09-05 — Quest creation and reward escrow
|
||||
|
||||
- Added board-dialog and `/quests create <block> <quantity>` creation using a valid block material, positive quantity, and the exact held reward stack.
|
||||
- Escrow preserves full Bukkit item metadata in durable Base64-backed YAML and rolls inventory removal back if persistence fails.
|
||||
- Quests receive UUID identifiers and UTC creation and seven-day expiration timestamps.
|
||||
- Verified 26 tests and the plugin JAR with `./gradlew clean check jar`.
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
type: User Story
|
||||
title: "US-003: Create a block-delivery quest"
|
||||
description: Let a player request block items while safely escrowing an inventory-funded reward.
|
||||
status: backlog
|
||||
status: done
|
||||
---
|
||||
|
||||
# US-003: Create a block-delivery quest
|
||||
@@ -11,15 +11,15 @@ As a **player**, I want to request a block material and quantity in exchange for
|
||||
|
||||
## Acceptance criteria
|
||||
|
||||
- [ ] A player can create a quest through a registered quest board by selecting a valid block material, a positive quantity, and reward items from their inventory.
|
||||
- [ ] Reward items must exist in the issuer's inventory and are removed only when quest creation succeeds.
|
||||
- [ ] Removed rewards are held durably in escrow by the quest system.
|
||||
- [ ] A created quest records a unique identifier, issuer UUID and current name, requested material and quantity, exact reward items, creation time, and expiration time.
|
||||
- [ ] Each quest expires exactly seven days after successful creation.
|
||||
- [ ] Invalid input, insufficient reward items, or persistence failure leaves the issuer's inventory unchanged and creates no quest.
|
||||
- [ ] When player commands are enabled, `/quests create ...` provides equivalent validated creation behavior with contextual autocomplete.
|
||||
- [ ] Quest state and item metadata survive server restarts without duplication or loss.
|
||||
- [ ] Automated tests verify validation, escrow, rollback, timestamps, command routing, and persistence.
|
||||
- [x] A player can create a quest through a registered quest board by selecting a valid block material, a positive quantity, and reward items from their inventory.
|
||||
- [x] Reward items must exist in the issuer's inventory and are removed only when quest creation succeeds.
|
||||
- [x] Removed rewards are held durably in escrow by the quest system.
|
||||
- [x] A created quest records a unique identifier, issuer UUID and current name, requested material and quantity, exact reward items, creation time, and expiration time.
|
||||
- [x] Each quest expires exactly seven days after successful creation.
|
||||
- [x] Invalid input, insufficient reward items, or persistence failure leaves the issuer's inventory unchanged and creates no quest.
|
||||
- [x] When player commands are enabled, `/quests create ...` provides equivalent validated creation behavior with contextual autocomplete.
|
||||
- [x] Quest state and item metadata survive server restarts without duplication or loss.
|
||||
- [x] Automated tests verify validation, escrow, rollback, timestamps, command routing, and persistence.
|
||||
|
||||
## Related
|
||||
|
||||
|
||||
Reference in New Issue
Block a user