H

You are a senior Minecraft backend engineer and plugin architect. Your task is to design and generate a COMPLETE, PRODUCTION-READY, HIGH-PERFORMANCE Minecraft Paper/Spigot plugin that fully replicates and extends the Hypixel SkyBlock Bazaar system.

The plugin must be modular, scalable, optimized, and suitable for a large multiplayer network (1000+ concurrent players).

---

๐Ÿ”ท CORE OBJECTIVE

Create a Bazaar system where players can:

  • Instantly buy/sell items using market prices
  • Create buy/sell orders
  • Experience real-time price changes based on supply/demand

---

๐Ÿ”ท TECH STACK REQUIREMENTS

  • Language: Java (latest LTS)
  • API: PaperMC (1.20+)
  • Database Support:

- MySQL (primary) - MariaDB - PostgreSQL - SQLite (fallback)

  • Use HikariCP for connection pooling
  • Use asynchronous database operations ONLY
  • Use caching layer (Caffeine or Redis optional)

---

๐Ÿ”ท CORE FEATURES (MANDATORY)

  1. ๐Ÿ“Š Bazaar Market System
  • Dynamic pricing based on:

- Supply vs Demand - Order volume

  • Each item has:

- Buy price - Sell price - Weekly trend - Daily volume

  1. ๐Ÿ“ฆ Instant Buy/Sell
  • Players can:

- Instantly buy items at lowest sell price - Instantly sell items at highest buy price

  • Partial order matching required
  1. ๐Ÿ“œ Order System (ADVANCED)
Kodari AI
KodariApr 14 at 12:31 pm 31,528 (v2)

Iโ€™ll create a comprehensive Hypixel SkyBlock Bazaar replication plugin with advanced order matching, dynamic pricing, and full GUI support.

HyperBazaar
A complete replication of Hypixel SkyBlock's Bazaar system featuring real-time dynamic pricing, instant buy/sell mechanics, advanced order matching with partial fulfillment, price history tracking, and supply/demand economics. Supports MySQL/PostgreSQL/SQLite with HikariCP pooling, async operations, and caching. Includes comprehensive GUI interfaces for trading, order management, and price analytics. Optimized for large-scale multiplayer networks with 1000+ concurrent players.

HyperBazaar plugin created successfully!

This is a complete, production-ready Hypixel SkyBlock Bazaar replication with:

โœ… Core Systems:

  • Dynamic pricing engine with supply/demand economics

  • Instant buy/sell mechanics with partial order matching

  • Advanced buy/sell order system with automatic matching

  • Real-time price updates (configurable interval)

  • Transaction history and price tracking

  • Order management (create, cancel, view)

โœ… Technical Features:

  • Multi-database support (MySQL, MariaDB, PostgreSQL, SQLite)

  • HikariCP connection pooling

  • Async-only database operations

  • Caffeine caching layer for performance

  • XSeries for cross-version compatibility

  • Lombok for clean code

โœ… GUI System:

  • Main bazaar browser with all items

  • Detailed item view with order book

  • Instant buy/sell with quantity options (1/64/640)

  • My Orders interface for order management

  • Fully interactive with sound effects

โœ… Admin Tools:

  • /bzadmin reload - Reload configuration

  • /bzadmin clearcache - Clear caches

  • /bzadmin info <item> - View item statistics

  • /bzadmin priceupdate - Restart price calculations

โœ… Scalability:

  • Optimized for 1000+ concurrent players

  • Connection pooling prevents database bottlenecks

  • Caching reduces database load

  • Async operations prevent server lag

The plugin is fully configured with 20 default tradeable items and ready for production deployment!

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
manifest.kod
Code
32 2,493
src/main/java/com/bazaar/BazaarPlugin.java
package com.bazaar;

import com.bazaar.commands.BazaarAdminCommand;
import com.bazaar.commands.BazaarCommand;
import com.bazaar.config.ConfigManager;
import com.bazaar.database.DatabaseManager;
import com.bazaar.inventory.gui.GUIListener;
import com.bazaar.inventory.gui.GUIManager;
import com.bazaar.listeners.PlayerListener;
import com.bazaar.managers.BazaarManager;
import com.bazaar.managers.CacheManager;
import com.bazaar.managers.OrderManager;
import com.bazaar.managers.PriceEngine;
import lombok.Getter;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public class BazaarPlugin extends JavaPlugin {
    
    private ConfigManager configManager;
    private DatabaseManager databaseManager;
    private CacheManager cacheManager;
    private BazaarManager bazaarManager;
    private OrderManager orderManager;
    private PriceEngine priceEngine;
    private GUIManager guiManager;
    
    @Override
    public void onEnable() {
        saveDefaultConfig();
        
        this.configManager = new ConfigManager(this);
        this.cacheManager = new CacheManager(this);
        this.databaseManager = new DatabaseManager(this);
        
        if (!this.databaseManager.connect()) {
            getLogger().severe("Failed to connect to database! Disabling plugin...");
            Bukkit.getPluginManager().disablePlugin(this);
            return;
        }
        
        this.databaseManager.createTables();
        
        this.bazaarManager = new BazaarManager(this);
        this.orderManager = new OrderManager(this);
        this.priceEngine = new PriceEngine(this);
        this.guiManager = new GUIManager();
        
        this.bazaarManager.loadItems();
        this.priceEngine.startPriceUpdateTask();
        
        registerCommands();
        registerListeners();
        
        getLogger().info("HyperBazaar has been enabled!");
    }
    
    @Override
    public void onDisable() {
        if (this.priceEngine != null) {
            this.priceEngine.stopPriceUpdateTask();
        }
        
        if (this.databaseManager != null) {
            this.databaseManager.disconnect();
        }
        
        getLogger().info("HyperBazaar has been disabled!");
    }
    
    private void registerCommands() {
        getCommand("bazaar").setExecutor(new BazaarCommand(this));
        getCommand("bazaaradmin").setExecutor(new BazaarAdminCommand(this));
    }
    
    private void registerListeners() {
        Bukkit.getPluginManager().registerEvents(new PlayerListener(this), this);
        Bukkit.getPluginManager().registerEvents(new GUIListener(this.guiManager), this);
    }
}