Repository navigation
fix: retain generator delivery overflow and remind players - #19
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Generator deliveries can drop items when inventory capacity runs out. Use the existing pending queue for SuperiorSkyblock2/BentoBox refunds and all six direct delivery paths: admin gives,
/pickupgens, generator-view GUI pickups, shop purchases, normal generator pickup, and first-join grants.Direct deliveries insert what fits and persist only the leftovers returned by the inventory API. Fully successful immediate deliveries do not create pending records or write refund data. For example, giving 130 wheat generators to a full inventory containing a stack of 62 inserts two and saves only the remaining 128. Shop purchases still charge once.
drop-on-break: truedeliberately drops the generator at its block location and bypasses the queue; no ground-item interception is added.Retry pending online deliveries every second. Send a reminder immediately and at most once per minute through
messages.pending-refundinconfig.yml.{generators}lists remaining counts with colored display names;{slots}respects stack limits. Two wheat generators and one pumpkin generator need two slots when the inventory is full. No claim command is added.Preserve the existing
data.ymlformat and public refund entry points. Retain missing generator IDs, coalesce scheduled deliveries, serialize queue changes, and ignore cancelled SuperiorSkyblock2 removal events. Immediate delivery checks main-thread/Folia entity ownership. Off-thread, disconnected, or shutdown requests are saved before scheduled delivery so task cancellation or retirement cannot discard them.Closes #17 when merged. Target:
master.Verification
./mvnw.cmd -B -ntp -o clean verify.java scripts/RefundCheck.java: 53 scenarios / 150 assertions against the actual refund manager, both island integrations, join handlers, commands and GUI callbacks with API substitutes. Includes full/available inventories across all six paths, both break modes and drop settings, shop charging, overflow-only persistence, partial delivery, reminders, restart data, ownership, disconnects and shutdown.plugin.yml;git diff --checkpassed.001dba2.Tested artifact
001dba269183ab590f0058ac23aea1b5ec75ce01NextGens-1.3.5.jar— 1,521,964 bytesDB98B580DD920009D66C9F34F9B2342E10DD7B345D48DBFD424BFFC19717FA07Verification is offline; no live Minecraft/Folia session is claimed. The harness simulates inventory, scheduler, economy and config behavior, while Maven verifies real API compilation and packaging. Existing AdvancedChestsAPI LATEST, JDK/deprecation and Shade warnings remain. No release or server restart is included. See
docs/refunds.mdfor the delivery and configuration contract.