joel07090

Features required:

  1. Custom Currencies (No Vault/Economy dependency):
  • Every player needs a balance for "Minecraft-Mark" (default: 50).
  • Every player needs a level for "Zopf" (default: 1).
  • Save these values in a YAML file (data.yml) so they don't reset on restart.
  • Create a Sidebar Scoreboard for every player showing their current "Minecraft-Mark" and "Zopf-Level".
  1. Commands for Admins:
  • /mark add/remove <player> <amount> (Permission: system.admin)
  • /zopf set <player> <amount> (Permission: system.admin)
  1. Auction House System (/ah):
  • Command "/ah" opens a Virtual Chest INVENTORY GUI showing all items listed for sale.
  • When hovering over an item in the INVENTORY GUI, add lore showing: "Price: X Minecraft-Mark" and "Seller: <Name>".
  • Clicking the item buys it using "Minecraft-Mark" (not normal money). It transfers the marks from buyer to seller and gives the item to the buyer.
  • Command "/ah sell <amount>" takes the item from the player's main hand and lists it in the INVENTORY GUI for that amount of Minecraft-Mark.
Kodari AI
KodariJun 27 at 11:48 am 2

I’ll create a custom dual-currency auction house plugin.

AuctionNexus
An auction house plugin with custom dual-currency economy. Players earn Minecraft-Marks and Zopf-Levels tracked via YAML persistence. Features include a virtual chest GUI for browsing/purchasing listings, selling held items, admin commands for balance adjustments, and a sidebar scoreboard displaying both currencies.

Creating all 17 project files:

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
14 880
src/main/java/com/auctionnexus/AuctionNexus.java
package com.auctionnexus;

import com.auctionnexus.commands.AuctionCommand;
import com.auctionnexus.commands.MarkCommand;
import com.auctionnexus.commands.ZopfCommand;
import com.auctionnexus.gui.GUIListener;
import com.auctionnexus.gui.GUIManager;
import com.auctionnexus.managers.AuctionManager;
import com.auctionnexus.managers.CurrencyManager;
import com.auctionnexus.managers.DataManager;
import com.auctionnexus.managers.ScoreboardManager;
import org.bukkit.plugin.java.JavaPlugin;

public class AuctionNexus extends JavaPlugin {

    private DataManager dataManager;
    private CurrencyManager currencyManager;
    private ScoreboardManager scoreboardManager;
    private AuctionManager auctionManager;
    private GUIManager guiManager;

    @Override
    public void onEnable() {
        this.dataManager = new DataManager(this);
        this.dataManager.load();

        this.currencyManager = new CurrencyManager(this.dataManager);
        this.guiManager = new GUIManager();
        this.auctionManager = new AuctionManager(this, this.dataManager, this.currencyManager, this.guiManager);
        this.scoreboardManager = new ScoreboardManager(this, this.currencyManager);

        getServer().getPluginManager().registerEvents(new GUIListener(this.guiManager), this);
        this.scoreboardManager.start();

        getCommand("mark").setExecutor(new MarkCommand(this.currencyManager));
        getCommand("zopf").setExecutor(new ZopfCommand(this.currencyManager));
        getCommand("ah").setExecutor(new AuctionCommand(this.auctionManager));
    }

    @Override
    public void onDisable() {
        if (this.dataManager != null) {
            this.dataManager.save();
        }
    }

    public CurrencyManager getCurrencyManager() {
        return this.currencyManager;
    }

    public AuctionManager getAuctionManager() {
        return this.auctionManager;
    }

    public GUIManager getGuiManager() {
        return this.guiManager;
    }
}