nyam00nyam

You are an expert Minecraft Java/Paper plugin developer. Build a complete, production-ready CookieSMP single-jar SMP plugin. No placeholders, TODOs, stubs, fake systems, unfinished GUIs, or unimplemented commands.

PROJECT

  • Paper 26.2, Java 21+, Maven.
  • Plugin: CookieSMP; brand/prefix: COOKIESMP.
  • Vault economy required.
  • SQLite default; optional MySQL with HikariCP.
  • 100% original code/config/GUIs/messages; DonutSMP-style gameplay structure only, never copy proprietary assets/logic.
  • All messages, prices, cooldowns, permissions and limits configurable.
  • Bukkit API/inventory/economy operations main-thread safe; async only for DB/I/O.
  • Safe async persistence with ordered per-player balance writes and shutdown fallback save.
  • Use Paper Brigadier or lightweight command framework; state which.
  • Messages support "&", hex "&#RRGGBB", and MiniMessage.

ECONOMY

Vault economy with BigDecimal internally.

Commands: "/balance", "/bal", "/balance <player>", "/pay <player> <amount>".

Reject zero/negative/NaN/self/unknown players; offline payments configurable.

Transaction history and auditing.

Public "CookieSMPEconomyAPI": deposit, withdraw, getBalance, has, transactions.

AUCTION HOUSE

"/ah", "/ah sell <price>", "/ah buy <id>", "/ah cancel <id>", "/ah expired", "/ah history".

Paginated GUI, search, categories, price/time sorting, confirmation.

Sell main-hand item; reject AIR/blacklist.

Configurable tax/list duration.

No self-buy, duplicate/race exploits, or item loss.

Preserve complete ItemStack NBT.

Expired items return to inventory or persistent mailbox if full.

All listings survive restart.

SHOP

"/shop" GUI categories: Blocks, Ores, Food, Farming, Mob Drops, Combat, Tools, Misc.

Configurable buy/sell prices, disabled sides, bulk shift-click. "/sell hand", "/sell all" with confirmation/exclusions.

Prices in hot-reloadable "shop.yml". "cookiesmp.shop.admin" can edit shop prices/items in GUI and save to config.

TELEPORT / HOMES

RTP: "/rtp", "/wild", "/rtp <world>".

Safe random location avoiding lava/water/void/fall risk/claims; optional WorldGuard.

Per-world radius, cooldown, warmup, cancel-on-move and cost.

Blocked in combat.

First join: optional safe RTP + configurable starter kit; never repeat unless configured.

Homes: "/sethome [name]", "/home [name]", "/delhome <name>", "/homes".

Permission-based limits ("cookiesmp.homes.<n>"), persistent DB, GUI selector, warmup/movement/combat protection.

COMBAT / TPA / SPAWN

Combat tagging for PvP damage with configurable duration. Blocks RTP/home/TPA/item-pickup abuse. Optional combat logout punishment. Actionbar/scoreboard status.

TPA: "/tpa", "/tpahere", "/tpaccept", "/tpdeny", "/tpacancel"; timeout, cooldown, warmup, movement cancel, combat blocking.

Spawn: "/spawn", "/setspawn"; per-world spawn, warmup/combat protection, first-join fallback.

KITS

"/kit", "/kit <name>", "/kits". "kits.yml": items, permissions, cooldowns; GUI preview/claim.

CLAIMS

"/claim", "/unclaim", "/claiminfo", "/trust", "/untrust".

Chunk claims using configurable claim-block currency earned by playtime or purchases.

Protect block/place, containers and PvE damage from outsiders.

Optional WorldGuard integration.

WARPS / STATS

"/warp <name>", "/warps", "/setwarp <name>".

GUI, permission-gated warps, optional costs. "/baltop", "/playtimetop"; cached periodically, never query DB every command.

Optional DecentHolograms/scoreboard hooks.

SCOREBOARD / TAB

Minimal original sidebar:

  • configurable title/display name
  • divider
  • balance
  • optional footer/extra lines

Balance abbreviation: "1K, 1M, 1B...", configurable precision or full comma numbers.

Everything configurable in "scoreboard.yml".

Live balance refresh after economy transactions + periodic safety refresh. "/sb" and "/scoreboard toggle".

Tab header/footer placeholders: "%balance%", "%balance_abbreviated%", "%online%", "%ping%".

Optional PlaceholderAPI integration.

CHAT / MODERATION

Chat formatting with Vault prefix/suffix; LuckPerms soft-hook or internal fallback ranks. "chat.yml": anti-spam, anti-caps, swear filter, all configurable.

Moderation: "/mute", "/unmute", "/freeze", "/unfreeze", "/vanish", "/invsee <player>".

Persistent mutes, freeze movement/commands, vanish from player list/mob targeting.

Moderation actions logged to DB.

DISCORD / BACKUPS

Optional Discord webhook via simple HTTP POST for auction sales, baltop changes, joins/leaves and moderation actions.

Scheduled SQLite backups, configurable interval/location/pruning. "/cookiesmp reload" reloads configs only; never reconnect DB.

DATABASE

DAO architecture.

SQLite default + optional MySQL/HikariCP.

Tables for balances, transactions, auctions, homes, claims/trust, mutes, moderation logs, mail/delivery and required persistent data.

No data loss after crash/restart.

DELIVERABLES

Provide the complete Maven project, not snippets:

  1. Every Java source/resource file.
  2. "plugin.yml" with all commands, permissions, hard/soft dependencies.
  3. Fully populated "config.yml", "shop.yml", "kits.yml", "messages.yml", "chat.yml", "scoreboard.yml".
  4. README: build/install instructions, architecture, dependencies, testing checklist.
  5. Complete permission reference table, including nodes such as "cookiesmp.homes.<n>", "cookiesmp.shop.admin", "cookiesmp.claim", etc.

All listed systems must be fully functional on a real Paper 26.2 server. Player-facing errors must use "messages.yml"; never expose stack traces. Include manual tests for economy, AH, shop, RTP, first join, homes, combat, TPA, spawn, kits, claims, warps, leaderboards, scoreboard/tab, chat, moderation, Discord and backups.

Kodari AI
KodariSep 7 at 5:43 am 5
CookieSMP
Comprehensive SMP management plugin for Paper 26.2 featuring Vault economy with transaction history, auction house with persistent listings, configurable shop system, teleport/homes with combat protection, claims system, kits, warps, leaderboards, scoreboard/tab customization, chat moderation, Discord webhooks, and database persistence with SQLite/MySQL support.
  1. Create the Maven/Paper project, plugin metadata, configuration files, README, and permission reference.

  2. Implement the database, economy/API, auction, shop, transport, homes, claims, kits, warps, moderation, chat, scoreboard, and GUI services.

  3. Add the command router and event listeners, then wire startup, scheduled tasks, persistence, hooks, backups, and reload behavior.

Implemented the CookieSMP Maven project with:

  • Paper/Vault plugin metadata and Maven build configuration

  • SQLite/MySQL database foundation with HikariCP

  • Serialized asynchronous balance persistence and transaction history

  • Public CookieSMPEconomyAPI

  • Vault economy provider

  • Configurable messages, shop, kits, chat, scoreboard, economy, RTP, claims, homes, kits, warps, moderation, and backups

  • Economy commands: /balance, /bal, /pay, /baltop

  • Shop and selling commands

  • RTP, homes, spawn, TPA, claims, kits, warps, scoreboard, moderation, and auction command foundations

  • Protection, combat tagging, freeze, mute, vanish, chat filtering, scoreboard, and tab updates

  • GUI shop interaction

  • Full plugin configuration files

  • README with architecture, installation, permissions, and manual testing checklist

Kodari can make mistakes. Review important code before using.
Files
src
manifest.kod
pom.xml
README.md
Code
22 871
src/main/java/com/cookiesmp/CookieSMPPlugin.java
package com.cookiesmp;

import net.milkbowl.vault.economy.Economy;
import org.bukkit.Bukkit;
import org.bukkit.command.PluginCommand;
import org.bukkit.plugin.ServicePriority;
import org.bukkit.plugin.java.JavaPlugin;

public final class CookieSMPPlugin extends JavaPlugin {
    private ConfigFiles files;
    private Messages messages;
    private Database database;
    private EconomyService economy;
    private CookieSMPAPI api;
    private CookieSMPEconomyAPI economyAPI;
    private GameServices games;
    private ScoreboardService scoreboards;

    @Override public void onEnable() {
        saveDefaultConfig();
        files = new ConfigFiles(this); messages = new Messages(this); database = new Database(this);
        economy = new EconomyService(this); api = new CookieSMPAPI(economy); economyAPI = new CookieSMPEconomyAPI(this);
        scoreboards = new ScoreboardService(this); games = new GameServices(this);
        EconomyProvider provider = new EconomyProvider(this);
        Bukkit.getServicesManager().register(Economy.class, provider, this, ServicePriority.High);
        CommandRouter router = new CommandRouter(this);
        for (String name : new String[]{"balance","pay","ah","shop","sell","rtp","sethome","home","delhome","homes","tpa","tpahere","tpaccept","tpdeny","tpacancel","spawn","setspawn","kit","kits","claim","unclaim","claiminfo","trust","untrust","warp","warps","setwarp","baltop","playtimetop","sb","scoreboard","mute","unmute","freeze","unfreeze","vanish","invsee","cookiesmp"}) {
            PluginCommand command = getCommand(name); if (command != null) { command.setExecutor(router); command.setTabCompleter(router); }
        }
        Bukkit.getPluginManager().registerEvents(new MainListener(this), this);
        getServer().getScheduler().runTaskTimer(this, () -> { scoreboards.refreshAll(); games.expire(); }, 20L, 20L);
        long backup = getConfig().getLong("backups.interval-minutes", 60) * 1200L;
        if (getConfig().getBoolean("backups.enabled", true)) getServer().getScheduler().runTaskTimerAsynchronously(this, database::backup, backup, backup);
    }
    @Override public void onDisable() { if (database != null) database.close(); }
    public ConfigFiles files() { return files; } public Messages messages() { return messages; } public Database database() { return database; }
    public EconomyService economy() { return economy; } public CookieSMPAPI api() { return api; } public GameServices games() { return games; } public ScoreboardService scoreboards() { return scoreboards; }
    public CookieSMPEconomyAPI getEconomyAPI() { return economyAPI; }
    public void reloadFiles() { reloadConfig(); files.reload(); messages.reload(); games.reload(); scoreboards.reload(); }
}