feat(quests): support requests for all inventory items
Release / release (push) Successful in 2m46s
CI / build (push) Successful in 1m19s

This commit is contained in:
dmg
2026-09-09 21:50:16 -04:00
parent de8ff83c3c
commit 3bd2dc7d14
27 changed files with 174 additions and 60 deletions
+2 -2
View File
@@ -8,9 +8,9 @@ description: Catalog of user stories for the Spigot Quest Board plugin.
1. [US-001: Build and release the plugin](us-001-build-and-release-plugin.md)
2. [US-002: Create and use shared quest boards](us-002-create-and-use-shared-quest-boards.md)
3. [US-003: Create a block-delivery quest](us-003-create-a-block-delivery-quest.md)
3. [US-003: Create an item-delivery quest](us-003-create-a-block-delivery-quest.md)
4. [US-004: Browse available quests](us-004-browse-available-quests.md) — includes login quest counts and board guidance.
5. [US-005: Deliver blocks and complete a quest](us-005-deliver-blocks-and-complete-a-quest.md)
5. [US-005: Deliver items and complete a quest](us-005-deliver-blocks-and-complete-a-quest.md)
6. [US-006: Cancel an owned quest](us-006-cancel-an-owned-quest.md)
7. [US-007: Expire quests and claim held items](us-007-expire-quests-and-claim-held-items.md) — includes recurring login reminders for unclaimed items.
8. [US-008: Control player quest commands](us-008-control-player-quest-commands.md)
@@ -23,5 +23,5 @@ As an **administrator**, I want to turn a targeted block into a quest board so t
## Related
- [US-003: Create a block-delivery quest](us-003-create-a-block-delivery-quest.md)
- [US-003: Create an item-delivery quest](us-003-create-a-block-delivery-quest.md)
- [US-004: Browse available quests](us-004-browse-available-quests.md)
@@ -1,17 +1,21 @@
---
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.
title: "US-003: Create an item-delivery quest"
description: Let a player request inventory items while safely escrowing an inventory-funded reward.
status: done
---
# US-003: Create a block-delivery quest
# US-003: Create an item-delivery quest
As a **player**, I want to request a block material and quantity in exchange for items I already own so that another player can fulfill my request safely.
As a **player**, I want to request an item material and quantity in exchange for items I already own so that another player can fulfill my request safely.
## Acceptance criteria
- [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] Requests accept all inventory item materials, including shulker shells and existing block items, while rejecting air, invalid names, and non-item materials.
- [x] Contextual material autocomplete includes non-block items; command and dialog wording describes items rather than only blocks.
- [x] Regression tests verify shell creation, autocomplete, and existing block-item support.
- [x] A player can create a quest through a registered quest board by selecting a valid item 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.
@@ -24,5 +28,5 @@ As a **player**, I want to request a block material and quantity in exchange for
## Related
- [US-002: Create and use shared quest boards](us-002-create-and-use-shared-quest-boards.md)
- [US-005: Deliver blocks and complete a quest](us-005-deliver-blocks-and-complete-a-quest.md)
- [US-005: Deliver items and complete a quest](us-005-deliver-blocks-and-complete-a-quest.md)
- [US-007: Expire quests and claim held items](us-007-expire-quests-and-claim-held-items.md)
@@ -25,5 +25,5 @@ As a **player**, I want to browse current quests so that I can decide which bloc
## Related
- [US-002: Create and use shared quest boards](us-002-create-and-use-shared-quest-boards.md)
- [US-005: Deliver blocks and complete a quest](us-005-deliver-blocks-and-complete-a-quest.md)
- [US-005: Deliver items and complete a quest](us-005-deliver-blocks-and-complete-a-quest.md)
- [US-013: Show custom reward item names](us-013-show-custom-reward-item-names.md)
@@ -1,29 +1,32 @@
---
type: User Story
title: "US-005: Deliver blocks and complete a quest"
description: Let a player deliver requested blocks at a quest board and receive the escrowed reward.
title: "US-005: Deliver items and complete a quest"
description: Let a player deliver requested items at a quest board and receive the escrowed reward.
status: done
---
# US-005: Deliver blocks and complete a quest
# US-005: Deliver items and complete a quest
As a **player**, I want to deliver requested blocks to a quest board so that I receive the promised reward and the issuer can claim my delivery.
As a **player**, I want to deliver requested items to a quest board so that I receive the promised reward and the issuer can claim my delivery.
## Acceptance criteria
- [x] Non-block requested items, including shulker shells, can be delivered and held for issuer claiming using existing escrow and rollback protections.
- [x] Delivery notifications and claim messages refer to items, and regression tests verify shell settlement and existing block deliveries.
- [x] An active quest offers a Complete Quest action through every registered board.
- [x] Completion requires the delivering player to possess the full requested quantity of the exact block material.
- [x] Successful completion removes the requested blocks from the delivering player's inventory and stores them as a claim for the issuer.
- [x] Completion requires the delivering player to possess the full requested quantity of the exact item material.
- [x] Successful completion removes the requested items from the delivering player's inventory and stores them as a claim for the issuer.
- [x] Successful completion gives the exact escrowed reward items to the delivering player.
- [x] Reward items that do not fit are dropped safely at the delivering player's feet with a clear message.
- [x] The issuer is notified immediately when online or on their next login when offline that delivered blocks can be claimed at a quest board.
- [x] The issuer is notified immediately when online or on their next login when offline that delivered items can be claimed at a quest board.
- [x] When player commands are enabled, `/quests complete <quest>` provides equivalent behavior with contextual autocomplete.
- [x] Completion is atomic and exactly one player can complete a quest, including simultaneous attempts.
- [x] Validation or persistence failure does not consume delivered blocks, release rewards, or change quest state.
- [x] Validation or persistence failure does not consume delivered items, release rewards, or change quest state.
- [x] Completed quests are no longer shown as active or completable.
- [x] Automated tests verify inventory validation, settlement, overflow, notifications, rollback, and concurrent completion protection.
## Related
- [US-003: Create a block-delivery quest](us-003-create-a-block-delivery-quest.md)
- [US-003: Create an item-delivery quest](us-003-create-a-block-delivery-quest.md)
- [US-007: Expire quests and claim held items](us-007-expire-quests-and-claim-held-items.md)
@@ -30,5 +30,5 @@ As a **quest issuer**, I want delivered blocks and returned rewards held at the
## Related
- [US-005: Deliver blocks and complete a quest](us-005-deliver-blocks-and-complete-a-quest.md)
- [US-005: Deliver items and complete a quest](us-005-deliver-blocks-and-complete-a-quest.md)
- [US-006: Cancel an owned quest](us-006-cancel-an-owned-quest.md)
@@ -23,6 +23,6 @@ As an **administrator**, I want to enable or disable player quest commands so th
## Related
- [US-002: Create and use shared quest boards](us-002-create-and-use-shared-quest-boards.md)
- [US-003: Create a block-delivery quest](us-003-create-a-block-delivery-quest.md)
- [US-003: Create an item-delivery quest](us-003-create-a-block-delivery-quest.md)
- [US-007: Expire quests and claim held items](us-007-expire-quests-and-claim-held-items.md)
- [US-012: Create quests by command near a board](us-012-create-quests-near-a-board.md)
@@ -24,7 +24,7 @@ As a **player**, I want the quest-board interface to fit on screen so that I can
## Related
- [US-002: Create and use shared quest boards](us-002-create-and-use-shared-quest-boards.md)
- [US-003: Create a block-delivery quest](us-003-create-a-block-delivery-quest.md)
- [US-003: Create an item-delivery quest](us-003-create-a-block-delivery-quest.md)
- [US-004: Browse available quests](us-004-browse-available-quests.md)
- [US-005: Deliver blocks and complete a quest](us-005-deliver-blocks-and-complete-a-quest.md)
- [US-005: Deliver items and complete a quest](us-005-deliver-blocks-and-complete-a-quest.md)
- [US-007: Expire quests and claim held items](us-007-expire-quests-and-claim-held-items.md)
@@ -11,7 +11,7 @@ As a **player**, I want to use the quest-creation command near a quest board so
## Acceptance criteria
- [x] When global player quest commands are disabled, `/quests create <block> <quantity>` remains available to a player within five blocks of a registered board interaction location.
- [x] When global player quest commands are disabled, `/quests create <item> <quantity>` remains available to a player within five blocks of a registered board interaction location.
- [x] Material and quantity autocomplete remain available for nearby quest creation.
- [x] A player farther than five blocks from every registered board is directed to move closer and no quest or escrow change occurs.
- [x] Board proximity requires the player and registered location to be in the same world.
@@ -22,5 +22,5 @@ As a **player**, I want named reward items identified by both custom name and ma
## Related
- [US-003: Create a block-delivery quest](us-003-create-a-block-delivery-quest.md)
- [US-003: Create an item-delivery quest](us-003-create-a-block-delivery-quest.md)
- [US-004: Browse available quests](us-004-browse-available-quests.md)