suman731220

Act as an expert Java Developer for Minecraft Paper 1.21+. Create a high-performance core plugin "AlooCore".

1. AUCTION HOUSE INVENTORY GUI (McFleet Season 1 Style):

  • Layout: 54-slot chest INVENTORY GUI.
  • Items: Use slots 0-44 for listings. Slots 45-53 for Navigation (Previous, Next, My Items, Refresh).
  • Design: Clean look. Item lore must show "Seller", "Price", and "Time Left".
  • Buying Logic (McFleet Style): When a player clicks an item, don't buy instantly. Open a Confirmation INVENTORY GUI with a "Confirm Purchase" (Green Wool) and "Cancel" (Red Wool).
  • Command: /ah, /ah sell <price>.

2. TRADE INVENTORY GUI (Hypixel Inspired):

  • Layout: 54-slot chest INVENTORY GUI divided vertically.
  • Left side (9x3 slots) for Player 1, Right side (9x3 slots) for Player 2.
  • Center Divider: Use White Stained Glass Panes as a vertical line (Slot 4, 13, 22, 31, 40, 49).
  • Money Trading: Bottom slots must have a button to "Offer Vault Money".
  • Status Control: Bottom corners have stained glass panes.

- Grey = Not Ready. - Yellow = One player accepted. - Green = Both accepted (3-second countdown starts before finalizing).

  • Feature: If any item/money is changed during the "Green" phase, it must instantly cancel the countdown and reset to "Grey".

3. CONFIGURATION & PERMISSIONS:

  • Full 'config.yml' to edit all INVENTORY GUI Titles, Item Names, and Messages.
  • Permissions:

- aloocore.ah.use, aloocore.ah.sell - aloocore.trade - aloocore.withdraw - aloocore.bounty.set - aloocore.admin (For /aloocore reload)

4. TECHNICAL REQUIREMENTS:

  • Hook into Vault API for all transactions.
  • Use Base64 Serialization for AH items to prevent data loss.
  • Use PersistentDataContainer (PDC) for Bank Notes (/withdraw).
  • Ensure Async file saving for zero lag.
  • Use 'net.kyori.adventure.text.Component' for Hex color support.

DELIVERABLES: Main.java, AHManager.java (with Confirmation INVENTORY GUI), TradeManager.java (Hypixel Layout), BountyManager.java, NoteManager.java, and a detailed config.yml.

Kodari AI
KodariDec 29 at 4:56 am 24,453 (v2)

I’ll create a comprehensive core plugin with GUI-based auction house, trading system, and economy features.

AlooCore
A high-performance core plugin featuring an advanced auction house with confirmation dialogs, Hypixel-inspired player trading system with money support, bank note withdrawal using PDC, and bounty management. All systems use interactive chest GUIs with MiniMessage formatting and Vault economy integration. Includes async data persistence and full configuration support.

I’ll create AlooCore with GUI-based auction house, Hypixel-style trading, bank notes, and bounty system.

Plan:

  • GUI framework (InventoryGUI, InventoryButton, GUIManager, GUIListener)

  • Auction house with confirmation dialog

  • Trade system with vertical split and money support

  • Bank note system with PDC

  • Bounty management

  • Vault economy integration

  • Async data persistence

  • Full configuration

AlooCore created successfully with:

  • GUI-based auction house with McFleet-style confirmation dialogs

  • Hypixel-inspired trading system with vertical split and money support

  • Bank note withdrawal using PDC

  • Bounty management with auto-claim on kill

  • Full Vault economy integration

  • Async data persistence (JSON)

  • MiniMessage formatting with hex color support

  • Complete configuration system

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
28 1,822
src/main/java/com/aloocore/AlooCore.java
package com.aloocore;

import com.aloocore.command.*;
import com.aloocore.inventory.gui.GUIListener;
import com.aloocore.inventory.gui.GUIManager;
import com.aloocore.manager.*;
import com.aloocore.util.ColorUtil;
import lombok.Getter;
import net.milkbowl.vault.economy.Economy;
import org.bukkit.Bukkit;
import org.bukkit.plugin.RegisteredServiceProvider;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public class AlooCore extends JavaPlugin {
    private Economy economy;
    private GUIManager guiManager;
    private AuctionManager auctionManager;
    private TradeManager tradeManager;
    private BountyManager bountyManager;
    private NoteManager noteManager;
    
    @Override
    public void onEnable() {
        saveDefaultConfig();
        
        if (!setupEconomy()) {
            getLogger().severe("Vault not found! Disabling plugin.");
            getServer().getPluginManager().disablePlugin(this);
            return;
        }
        
        this.guiManager = new GUIManager();
        this.auctionManager = new AuctionManager(this);
        this.tradeManager = new TradeManager(this);
        this.bountyManager = new BountyManager(this);
        this.noteManager = new NoteManager(this);
        
        Bukkit.getPluginManager().registerEvents(new GUIListener(guiManager), this);
        
        getCommand("ah").setExecutor(new AuctionCommand(this));
        getCommand("trade").setExecutor(new TradeCommand(this));
        getCommand("withdraw").setExecutor(new WithdrawCommand(this));
        getCommand("bounty").setExecutor(new BountyCommand(this));
        getCommand("aloocore").setExecutor(new AdminCommand(this));
        
        auctionManager.loadListings();
        bountyManager.loadBounties();
        
        getLogger().info("AlooCore enabled successfully!");
    }
    
    @Override
    public void onDisable() {
        if (auctionManager != null) {
            auctionManager.saveListings();
        }
        if (bountyManager != null) {
            bountyManager.saveBounties();
        }
        if (tradeManager != null) {
            tradeManager.cancelAllTrades();
        }
        
        getLogger().info("AlooCore disabled successfully!");
    }
    
    private boolean setupEconomy() {
        if (getServer().getPluginManager().getPlugin("Vault") == null) {
            return false;
        }
        RegisteredServiceProvider<Economy> rsp = getServer().getServicesManager().getRegistration(Economy.class);
        if (rsp == null) {
            return false;
        }
        economy = rsp.getProvider();
        return economy != null;
    }
    
    public void msg(org.bukkit.command.CommandSender sender, String path) {
        String prefix = getConfig().getString("messages.prefix", "");
        String message = getConfig().getString("messages." + path, path);
        sender.sendMessage(ColorUtil.colorize(prefix + " " + message));
    }
    
    public void msg(org.bukkit.command.CommandSender sender, String path, String... replacements) {
        String prefix = getConfig().getString("messages.prefix", "");
        String message = getConfig().getString("messages." + path, path);
        for (int i = 0; i < replacements.length; i += 2) {
            if (i + 1 < replacements.length) {
                message = message.replace(replacements[i], replacements[i + 1]);
            }
        }
        sender.sendMessage(ColorUtil.colorize(prefix + " " + message));
    }
}