1.4.0
Compatibility
Changes
Added
-
Virtual Delivery System: When purchasing items that exceed inventory capacity, overflow items are automatically sent to a pending delivery queue instead of being lost.
- SQLite-based delivery storage (
deliveries.db) with transaction safety to prevent race conditions and duplication exploits. - FIFO (First-In-First-Out) claiming with per-material tracking.
- Automatic database-first claiming approach prevents item duplication on logout/crash.
- Configurable settings:
delivery.enabled,delivery.auto-claim-on-login,delivery.max-pending-per-player.
- SQLite-based delivery storage (
-
Market GUI Integration: Access deliveries directly from the market interface.
- Ender Chest button in slot 51 displays pending item count badge.
- Full deliveries panel with material breakdown and claim buttons.
- Left-click to claim all of a material, right-click to claim one stack.
- "Claim All" button (slot 49) for bulk claiming with progress feedback.
-
Delivery Commands: Console and command-block support for delivery system.
/market delivery list- View pending deliveries with formatted output./market delivery claim <material> [amount]- Claim specific items./market delivery claim-all- Claim all pending deliveries./market delivery gui- Open market GUI directly to deliveries panel.
-
Web API Endpoints: Full delivery system integration for web dashboard.
GET /api/deliveries- List pending deliveries (returns{enabled, deliveries, total}).POST /api/deliveries/claim- Claim deliveries (body:{material?, amount?}for specific or all).- Updated
/docsendpoint with delivery API documentation.
-
Enhanced Configuration Documentation: Comprehensive inline comments in
config.ymlexplaining delivery system settings with pros/cons and recommendations (200+ lines of documentation).
Fixed
- Critical: Fixed buy loop bug where purchasing 64 items would only deliver 1 on 1.20.1 servers. Buy logic now properly calculates overflow and sends all excess items to delivery in a single operation.
Security
- Race Condition Protection: Atomic transactions in
addPending()withconn.autoCommit=falseprevent concurrent purchases from exceedingmax-pending-per-playerlimit. - Duplication Prevention: Database-first approach in
claimMaterial()removes items from database before giving to player, preventing logout duplication exploits. - Transaction Safety: All delivery database operations wrapped in explicit try-catch with rollback to prevent data corruption on errors.
Technical
DeliveryManagerclass (426 lines) handles all delivery operations with SQLite backend.- Per-player delivery limits with atomic transaction checks.
- Inventory capacity calculation accounts for partial stacks and empty slots.
- Delivery system fully integrated into existing buy/sell flow in
MarketCommandandWebServer.
Upgrade Notes
- Database: New
deliveries.dbcreated automatically on first launch with delivery system enabled. - Config: Three new keys added with defaults (see
config.ymlfor full documentation):delivery.enabled: true- Enable/disable delivery system.delivery.auto-claim-on-login: false- Automatically attempt to claim deliveries on player join.delivery.max-pending-per-player: 100000- Maximum items that can be pending per player.
- No Breaking Changes: Existing functionality unchanged. Delivery system activates only when inventory is full during purchase.
- Migration: Update from 1.3.1 is seamless. No data migration required.
Acknowledgments
- Continued thanks to ChunkCraft server for detailed bug reporting and testing feedback throughout v1.4.0 development! ๐
Projects on Modrinth are automatically available through a Maven repository for use with JVM build tools such as Gradle. To learn more about the Modrinth Maven API, click here.
Note: When available, you should use the creator's maven repo instead as it will have transitive dependency information that the Modrinth Maven API does not. You may also end up with duplicate dependencies if you use a mix of Modrinth and non-Modrinth Maven repositories for your dependencies, because the group identifier will be different when served through the Modrinth Maven API.
Maven coordinates:
Version ID:
build.gradle:
repositories {
exclusiveContent {
forRepository {
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
}
}
// forRepositories(fg.repository) // Uncomment when using ForgeGradle
filter {
includeGroup "maven.modrinth"
}
}
}
// Standard Gradle dependency
dependencies {
implementation "maven.modrinth:KXwEZ1KS:wwd0WhWj"
}
// Legacy Loom dependency
dependencies {
modImplementation "maven.modrinth:KXwEZ1KS:wwd0WhWj"
}

