--- type: User Story title: "US-007: Configure and persist harvesting behavior" description: Give operators validated configuration and durable storage for crop progression and harvesting behavior. status: done --- # US-007: Configure and persist harvesting behavior As a **server operator**, I want harvesting behavior to be configurable and player progression to be durable so that the plugin remains predictable across restarts and server changes. ## Acceptance criteria - [x] Configuration defines supported crops and the block material, maturity rule, and planting item for each crop. - [x] Configuration defines every level-local requirement and operation cap independently for each supported crop. - [x] Configuration defines eligible game modes, crops processed per tick, boss-bar idle duration, and unlock-notification timing. - [x] Defaults match the crops, requirements, caps, one-crop-per-tick pace, Survival-only progression, and five-second boss-bar duration documented by related stories. - [x] Requirements and caps are positive, representable, and sequentially coherent. - [x] Processing rates and notification durations reject unsafe or nonsensical values. - [x] Invalid required configuration prevents partial plugin initialization and produces a clear server log message. - [x] UUID-keyed state persists latest known player names, each crop's earned level and level-local progress, and the player's boss-bar preference. - [x] Existing player records without a boss-bar preference safely default to enabled. - [x] Active auto-harvest operations are transient and do not resume after a restart or reconnect. - [x] State is saved safely so a failed write does not replace valid persisted state with a partial document. - [x] Corrupt or invalid records are handled defensively and cannot silently grant progression or larger operation caps. - [x] Unknown forward-compatible configuration and state fields are preserved where practical. ## Related - [US-001: Track crop harvesting progression](us-001-track-crop-harvesting-progression.md) - [US-003: Harvest connected mature crops](us-003-harvest-connected-mature-crops.md) - [US-006: Administer player harvest progression](us-006-administer-player-harvest-progression.md) - [US-008: Build and release the plugin](us-008-build-and-release-plugin.md)