ModsJava
GMShop ✦ Dynamic Market & Bonding Curve Economy ✦ Redis Sync [1.20-1.21]
Java mod listed for Minecraft 1.20–1.21. Downloads from the MC Java Mods app on Android.
GM SHOP Autonomous Dynamic Economy Engine & Distributed Multi-Server Market Self-balancing bonding curve economics • Real-time Redis network mesh • 100%…
⬇ Download on SpigotGMSHOP
Autonomous Dynamic Economy Engine & Distributed Multi-Server Market
Self-balancing bonding curve economics • Real-time Redis network mesh • 100% Asynchronous HikariCP architecture
Discord Support
1. The Core Philosophy: Why GMShop?
Traditional Minecraft shops operate on fixed, static pricing. On modern servers with automated mob farms, massive raid farms, and iron golems, static economies break within days:
- Rampant Hyperinflation: Millions of automated items flood the market, causing currency devaluation.
- Administrative Burnout: Staff must continuously rebalance prices manually or impose artificial selling caps.
- Stagnant Gameplay: Once players establish the single most profitable farm, all other trading becomes obsolete.
GMShop replaces static shops with an automated mathematical marketplace based on Bonding Curve Pricing. The market reacts dynamically to every single item transaction:
- High Demand, Low Stock: When players buy out an item, its price climbs toward its configured maximum.
- Market Oversaturation: When players dump farmed goods, the price depreciates toward its safe floor.
- Automatic Self-Stabilization: Unattended goods slowly decay back toward their equilibrium target over time.
2. Technical Architecture & Enterprise Features
- Cross-Server Redis Synchronization: Run 2 or 50 servers behind Velocity or BungeeCord. Transactions on any node publish instant delta updates across gmshop:market_update via Redis Pub/Sub, updating GUI states and inventory pools network-wide in sub-milliseconds.
- Distributed Anti-Dupe Locks (Lua-Powered): Eliminates cross-server inventory duplication and concurrent double-click race conditions. All transaction pipelines acquire atomic Redis locks verified via Lua scripts with auto-expiring session tokens, backed by local node fallbacks using ConcurrentHashMap and AtomicBoolean.
- Non-Blocking Asynchronous Persistence: Every single database read, transaction log, and pool update runs fully off the server main thread through high-performance HikariCP connection pools (supporting both MySQL/MariaDB clusters and local SQLite). Your server stays at a rock-solid 20.0 TPS.
- Lossless Native Paper NBT/PDC Preservation: Uses Paper's native ItemStack.serializeAsBytes(). Custom Model Data, PersistentDataContainers, complex attributes, enchantments, and custom items from MMOItems, ItemsAdder, Oraxen, and EcoItems are preserved identically.
- Anti-Dumping Circuit Breakers: Built-in volume dampeners detect and mitigate rapid warehouse sell-offs, preventing single players from instantly wiping out an item's price floor.
- Automated Limit Orders: Players can place buy/sell limit orders that process autonomously in background threads the moment market prices hit their requested thresholds.
- Auditable Transaction Ledger: Full historical logging in the gmshop_history table captures timestamp, player UUID, item ID, trade type, currency, volume, and total cost for complete economy monitoring.
3. Mathematical Pricing Mechanics
Item pricing is entirely deterministic. The engine dynamically calculates live unit prices based on current stock deviations from the target pool:
Code (Text):
Current Price = Base Price * (1 + Elasticity * ((Target Pool - Current Stock) / Target Pool))
(Clamped strictly between Min Price and Max Price)
- Base Price (base_price): The nominal value when the item pool is in perfect equilibrium.
- Current Stock (stock_pool): Real-time quantity of items available in the global market reserve.
- Target Pool (target_pool): The ideal supply quota set by administrators for that specific economy tier.
- Elasticity (elasticity): The volatility multiplier controlling how sharply price swings respond to volume.
- Min / Max Price: Strict price bounds that prevent total market crashes or unbounded hyperinflation.
4. Complete Commands Reference
| Command | Description | Default Permission |
| /shop [category] | Opens the primary dynamic market categories GUI. | gmshop.use |
| /shop sell | Opens the quick-sell disposal GUI. | gmshop.sell |
| /shop sellall [category] | Instantly liquidates all market-eligible items from inventory. | gmshop.sellall |
| /shop orders | Opens the player's active limit orders GUI. | gmshop.orders |
| /shop history | Views personal transaction history and expenditures. | gmshop.history |
| /gmshop additem <id> <base> <target> <elasticity> <min> <max> | Registers the held item into the market database. | gmshop.admin.add |
| /gmshop removeitem <id> | Removes an item from the market database. | gmshop.admin.remove |
| /gmshop setstock <id> <amount> | Overrides the active stock pool of an item. | gmshop.admin.stock |
| /gmshop settarget <id> <amount> | Updates the target equilibrium pool of an item. | gmshop.admin.target |
| /gmshop inspect <id> | Displays deep mathematical metrics and volume for an item. | gmshop.admin.inspect |
| /gmshop reload | Hot-reloads configuration files, locale translations, and menus. | gmshop.admin.reload |
5. Full Permissions Hierarchy
- General Player Permissions:
- gmshop.use — Allows browsing and purchasing from the market (Default: True)
- gmshop.sell — Allows selling items to the market pool (Default: True)
- gmshop.sellall — Grants access to the mass bulk sell command (Default: True)
- gmshop.orders — Allows creating and cancelling personal limit orders (Default: True)
- gmshop.history — Allows viewing personal transaction receipts (Default: True)
- Administrative & Bypass Permissions:
- gmshop.admin — Full wildcard access to all management commands (Default: OP)
- gmshop.admin.add — Permission to add new items into the market (Default: OP)
- gmshop.admin.remove — Permission to delete items from the market (Default: OP)
- gmshop.admin.stock — Permission to override stock values (Default: OP)
- gmshop.admin.target — Permission to adjust target pools (Default: OP)
- gmshop.admin.inspect — Permission to inspect live item math (Default: OP)
- gmshop.admin.reload — Permission to reload plugin configurations (Default: OP)
- gmshop.bypass.circuitbreaker — Bypasses anti-dumping rate limits (Default: OP)
- gmshop.bypass.cooldown — Bypasses transaction confirmation delays (Default: OP)
6. Dependencies & Requirements Matrix
| Requirement | Type | Supported Versions | Description |
| Server Platform | Required | PaperMC, Purpur (1.20.4, 1.21+) | Requires Paper runtime for native binary NBT item serialization. |
| Java Runtime | Required | Java 17 or Java 21 | Built using modern Java standards and concurrency primitives. |
| Vault | Required | 1.7.3+ | Standard Bukkit economy integration bridge. |
| Economy Engine | Required | EssentialsX, CoinsEngine, TheNewEconomy | Underlying economy provider managing player currency balances. |
| Redis Server | Optional | Redis 6.x, 7.x+ | Required only for multi-server networks behind Velocity/Bungee. |
| SQL Database | Required (Built-in) | MySQL 8.0+, MariaDB 10.5+, or SQLite | Defaults to embedded SQLite; MySQL recommended for networks. |
| PlaceholderAPI | Optional | 2.11.x+ | Exposes live market prices, stocks, and trends to scoreboards/tab. |
7. Production Configuration Showcase
Code (YAML):
# =============================================================
# GMShop Production Configuration
# Author: GemeZ | ReturnMC Network
# =============================================================
database:
type : "MYSQL" # Options: MYSQL, SQLITE
mysql:
host : "127.0.0.1"
port : 3306
database : "network_economy"
username : "gmshop_srv"
password : "YourStrongPasswordHere"
maximum-pool-size : 10
connection-timeout-ms : 5000
sqlite:
file : "gmshop.db"
redis:
enabled : true
host : "127.0.0.1"
port : 6379
password : ""
timeout-ms : 2000
channel : "gmshop:market_update"
transaction-lock-ttl-ms : 30000
market-engine:
anti-dumping:
enabled : true
max-sell-volume-per-interval : 2500
interval-seconds : 60
lockout-duration-seconds : 30
decay:
enabled : true
interval-seconds : 1800
decay-factor : 0.03
transactions:
tax-percent : 0.05
categories:
minerals:
display-name : "ECC71Minerals & Gems"
icon : "DIAMOND"
slot : 11
farming:
display-name : "&#F39C12Agricultural Produce"
icon : "WHEAT"
slot : 13
| Placeholder | Output Description | Example Output |
| %gmshop_price_<item_id>% | Formatted live unit purchase price | $142.50 |
| %gmshop_sellprice_<item_id>% | Formatted live unit sell payout (with tax) | $135.37 |
| %gmshop_stock_<item_id>% | Total item count remaining in market pool | 1,842 |
| %gmshop_target_<item_id>% | Target equilibrium quota of the item | 2,000 |
| %gmshop_trend_<item_id>% | Recent price vector indicator | ▲ +4.2% |
| %gmshop_status_<item_id>% | Descriptive market depth condition | HIGH DEMAND / EQUILIBRIUM |
9. Developer API & Event Hooks
Code (Java):
@EventHandler
public void onMarketTransaction (MarketTransactionEvent event ) {
UUID playerUuid = event. getPlayerUuid ( ) ;
String itemId = event. getItemId ( ) ;
int amount = event. getAmount ( ) ;
BigDecimal totalPrice = event. getTotalPrice ( ) ;
TradeType type = event. getType ( ) ;
plugin. getLogger ( ). info ( "Trade: " + playerUuid + " -> " + type + " x" + amount + " " + itemId ) ;
}
@EventHandler
public void onPriceChange (MarketPriceChangeEvent event ) {
String itemId = event. getItemId ( ) ;
BigDecimal oldPrice = event. getOldPrice ( ) ;
BigDecimal newPrice = event. getNewPrice ( ) ;
}
- Single Server Setup:
- Place GMShop-1.0.0.jar into the plugins/ directory.
- Verify Vault and your economy provider (e.g., EssentialsX) are installed.
- Start the server to generate standard configuration files.
- Default configuration runs immediately on embedded SQLite with zero external dependencies.
- Distributed Multi-Server Mesh Setup (Velocity / BungeeCord):
- Install GMShop-1.0.0.jar on every backend Paper instance.
- Open plugins/GMShop/config.yml and point all instances to the same centralized MySQL/MariaDB database.
- Set redis.enabled: true and configure matching Redis credentials.
- Restart backend servers. Schemas and Pub/Sub listener threads will bind automatically.
11. Frequently Asked Questions (FAQ)
Q: Does this plugin support custom items with custom model data, PDC, or MMOItems?
A: Yes. Because GMShop uses Paper's native byte serialization directly into the database, every single NBT tag, lore, custom model data, and PDC container is preserved 1:1 without loss.
Q: What happens if our Redis instance temporarily goes down?
A: GMShop will automatically log the connection failure, maintain localized failover safeguards, and continuously attempt background thread reconnection without crashing your Minecraft server.
Q: Can players exploit the market by selling 50 double chests of iron at once?
A: No. Every unit in a bulk transaction is calculated dynamically along the curve as it is processed. Selling large batches progressively lowers the price per item down to your configured min_price, and the Anti-Dumping circuit breaker will stop massive spam transfers.
Engineered & Maintained by GemeZ • ReturnMC Network
High-Performance Distributed Infrastructure Built for Modern Minecraft Networks
Quick facts
- Edition: Minecraft Java
- File type: .jar
- Minecraft versions listed: 1.20, 1.20.6, 1.21
- How to install: Install the matching mod loader (Forge, Fabric or NeoForge) for your Minecraft version. → Download the .jar. → Put it in the .minecraft/mods folder and launch that loader profile.
- Where to get it: Opens on Spigot — not every file is mirrored on our own servers.
Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.
GMShop ✦ Dynamic Market & Bonding Curve Economy ✦ Redis Sync [1.20-1.21] is a free Minecraft Java mod. Compatible with Minecraft 1.20, 1.20.6, 1.21. Downloaded 7 times (via Spigot). Download it and open it directly in the game.