Skip to content

fix: retain generator delivery overflow and remind players - #19

Merged
mdaffa48 merged 2 commits into
masterfrom
codex/fix-17-pending-refunds
Oct 18, 2026
Merged

mdaffa48 merged 2 commits into
masterfrom
codex/fix-17-pending-refunds

Conversation

@mdaffa48

@mdaffa48 mdaffa48 commented Oct 18, 2026 •

Copy link
Copy Markdown
Collaborator

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: true deliberately 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-refund in config.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.yml format 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

  • Java 25 ./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.
  • Mutation check rejects queuing quantities already inserted into the inventory.
  • All 21 hologram provider checks.
  • Shaded JAR contains plugin.yml; git diff --check passed.
  • GitHub Actions: pull-request and push builds passed for 001dba2.

Tested artifact

  • Commit: 001dba269183ab590f0058ac23aea1b5ec75ce01
  • Local JAR: NextGens-1.3.5.jar — 1,521,964 bytes
  • SHA-256: DB98B580DD920009D66C9F34F9B2342E10DD7B345D48DBFD424BFFC19717FA07

Verification 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.md for the delivery and configuration contract.

@mdaffa48 mdaffa48 changed the title fix: retain pending generator refunds and remind players fix: retain generator delivery overflow and remind players Oct 18, 2026
@mdaffa48
mdaffa48 merged commit 8c6583b into master Oct 18, 2026
2 checks passed
@mdaffa48
mdaffa48 deleted the codex/fix-17-pending-refunds branch October 28, 2026 02:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Generators dropped on the ground when kicked/leaving/banned/disbanded from an island with a full inventory (SuperiorSkyblock2)

1 participant