extrask

no comments in code or anything like that, no ai traces. clean and works for 1.21.11 no errors make sure that it works

📎 1 file 9,193 chars
📄
pasted-code-1793555029926.txt
txt 387 lines
▶
# PROJECT: Complete DonutSMP-Inspired Minecraft Network System

You are an expert Minecraft plugin developer, software architect, and UI/UX designer.

I want you to build a complete, production-quality Minecraft survival server system heavily inspired by the gameplay mechanics and feature set of DonutSMP.

This is NOT a request for a basic economy plugin. I want a complete, interconnected server ecosystem where every feature works together.

The goal is to recreate the overall gameplay experience, functionality, convenience, and polished interfaces of modern DonutSMP, while using original code, original branding, and configurable mechanics.

## 1. FIRST: RESEARCH AND PROJECT INSPECTION

Before writing code:

- Inspect the entire existing project.
- Identify its programming language, build system, Minecraft version, dependencies and architecture.
- Check the latest documented DonutSMP mechanics and commands.
- Pay particular attention to the June 2026 changes and newer systems.
- Understand how its Auction House, Orders, economy, homes, player profiles and menus work.
- Identify which features are current, which are legacy and which are optional.
- Create a detailed implementation plan.

Do not blindly overwrite existing files or destroy working functionality.

If this is an empty project, establish a clean and professional architecture.

## 2. CORE TECHNICAL REQUIREMENTS

Target:
- Minecraft Java Edition 1.21.11.
- Paper API.
- Java 21.
- Maven or Gradle, depending on the existing project.

Requirements:
- Deliver a working installable plugin JAR.
- Modular architecture.
- Persistent player data.
- SQLite support by default.
- Optional MySQL support.
- Async database operations where appropriate.
- Proper caching.
- Configurable messages.
- Configurable permissions.
- Full tab completion.
- No unnecessary dependencies.
- Support PlaceholderAPI and Vault integration where appropriate.
- Avoid blocking the main server thread.

The plugin should be easy to maintain and expand.

## 3. ECONOMY SYSTEM

Create a complete economy.

Commands:
- /bal
- /balance
- /pay
- /baltop
- /money
- /eco (admin)

Features:
- Player balances.
- Sending money to other players.
- Transaction history.
- Economy leaderboards.
- Admin balance management.
- Configurable starting balance.
- Configurable maximum balance.
- Transaction validation.
- Economy logging.

Every transaction must be safe against duplication, race conditions and negative-balance exploits.

## 4. AUCTION HOUSE

Commands:
- /ah
- /ah sell 
- /ah search 
- /ah expired
- /ah history
- /ah reload (admin)

Build a complete Auction House GUI.

Features:
- List items for sale.
- Browse listings.
- Search items.
- Category filters.
- Price sorting.
- Recently listed sorting.
- Buy confirmation.
- Listing expiration.
- Listing limits.
- Collection of expired listings.
- Collection of sold-item proceeds.
- My Listings menu.
- Listing history.
- Configurable listing fees.
- Configurable taxes.
- Item metadata preservation.
- Enchantment preservation.
- Support for custom items.

Important:
- Prevent players from buying their own listings if configured.
- Prevent duplicate purchases.
- Prevent item duplication.
- Never remove money without successfully completing a purchase.
- Never lose an item if a transaction fails.
- Handle server shutdowns and restarts safely.

The Auction House must be fully persistent.

## 5. ORDERS SYSTEM

Create a separate player-driven buying system inspired by modern DonutSMP Orders.

Commands:
- /orders
- /order 
- /orders create
- /orders mine

Features:
- Players create buy orders.
- Specify item, quantity and price.
- Reserve the required money.
- Other players can fulfill orders.
- Partial fulfillment.
- Full fulfillment.
- Cancel orders.
- Claim completed transactions.
- Order expiration.
- Order search and sorting.
- Remaining quantity display.

Economy integration:

The Orders system and Auction House should communicate.

For example:
- Players should be able to purchase matching Auction House listings through eligible buy orders.
- /sell should optionally prioritize the best compatible active buy order.
- All transactions should validate available money and item quantities.

Make all routing rules configurable.

## 6. SELL SYSTEM

Commands:
- /sell
- /sell hand
- /sell all
- /sell history

Features:
- Configurable item prices.
- Sell GUI.
- Preview before selling.
- Transaction history.
- Item blacklists.
- Custom sell prices.
- Integration with Orders.
- Configurable price multipliers.

Never sell items without proper confirmation when the action could result in accidental loss.

## 7. HOMES AND TELEPORTATION

Commands:
- /sethome
- /home
- /homes
- /delhome
- /renamehome
- /tpa
- /tpaccept
- /tpdeny
- /tpahere
- /rtp
- /spawn
- /back

Features:
- Multiple saved homes.
- Home management GUI.
- Rename and delete homes.
- Configurable home limits.
- Permission-based home limits.
- Teleport requests.
- Request expiration.
- RTP regions.
- Safe random teleportation.
- Spawn configuration.
- Last-location tracking.
- Configurable cooldowns.

Prevent teleportation into unsafe locations, unloaded areas and invalid worlds.

## 8. PLAYER SYSTEMS

Commands:
- /profile
- /stats
- /friends
- /friend
- /msg
- /reply
- /ignore
- /settings
- /enderchest

Features:
- Player profiles.
- Friends system.
- Private messages.
- Ignore lists.
- Player statistics.
- Playtime tracking.
- Kills and deaths.
- Customizable settings.
- Player preferences.
- Persistent data.

## 9. LEADERBOARDS AND SCOREBOARDS

Create:
- Money leaderboard.
- Kills leaderboard.
- Playtime leaderboard.
- Death statistics.
- Custom leaderboards.

Features:
- Configurable scoreboard.
- Toggleable scoreboard elements.
- Custom tablist.
- Configurable animations.
- Placeholder support.
- Efficient updating without unnecessary server load.

## 10. CUSTOM MENUS AND UI

This is extremely important.

I want the interfaces to look professionally designed.

Create polished menus for:
- Main menu.
- Auction House.
- Orders.
- Homes.
- Player profile.
- Settings.
- Economy.
- Leaderboards.
- Sell interface.

Requirements:
- Consistent visual style.
- Proper item icons.
- Custom item names and lore.
- Pagination.
- Search functionality.
- Confirmation screens.
- Back buttons.
- Clear feedback.
- No broken inventory interactions.

Use native Minecraft dialogs where appropriate and supported. Otherwise use properly implemented inventory GUIs.

## 11. ADMINISTRATION

Commands:
- /system reload
- /system debug
- /system version
- /eco
- /setspawn
- /setrtp
- /system admin

Features:
- Permission management.
- Admin balance modification.
- Item transaction inspection.
- Player data inspection.
- Configuration reloads.
- Debug logging.
- Administrative audit logs.

Every command must have proper permissions and validation.

## 12. CONFIGURATION

Everything important should be configurable.

Create organized configuration files for:
- Economy.
- Auction House.
- Orders.
- Selling.
- Homes.
- Teleportation.
- GUI menus.
- Messages.
- Permissions.
- Scoreboards.
- Database.
- General settings.

Do not hardcode prices, cooldowns, limits or messages.

## 13. CODE QUALITY AND SECURITY

This is a real production server project.

Requirements:
- No placeholder implementations.
- No fake functionality.
- No commands that simply print success without doing anything.
- No TODOs replacing requested features.
- Proper exception handling.
- Input validation.
- Database transaction safety.
- Item duplication prevention.
- Memory leak prevention.
- Efficient event handling.
- Proper shutdown handling.
- Thread safety.
- Logging for important transactions.

Do not sacrifice reliability for unnecessary complexity.

## 14. DEVELOPMENT APPROACH

Build this in clearly defined phases:

PHASE 1: Project architecture, database and player data.

PHASE 2: Economy and transactions.

PHASE 3: Auction House.

PHASE 4: Orders and economy integration.

PHASE 5: Sell system.

PHASE 6: Homes and teleportation.

PHASE 7: Player systems and statistics.

PHASE 8: GUIs and visual polish.

PHASE 9: Administration, permissions and configuration.

PHASE 10: Testing, optimization and bug fixing.

After each phase:
- Compile the project.
- Fix compilation errors.
- Test the implemented functionality.
- Check for integration issues.
- Update documentation.

Do not claim a feature is finished unless it actually works.

## 15. FINAL EXPECTATION

I want a cohesive, polished, feature-rich Minecraft survival system.

The Auction House, Orders, economy, homes, player data and menus must all work together.

Prioritize functionality, reliability and user experience.

Do not stop after creating the architecture or a few basic commands.

Actually implement the project, test it, fix issues and deliver the final installable JAR with all required configuration files and setup instructions.

If the project is too large to finish in one session, maintain a development checklist and continue from the last completed phase without rewriting working systems.

Start by inspecting the project and presenting your implementation plan. Then begin development.
Kodari AI
KodariNov 1 at 5:49 pm 1
DonutSMPNetwork
A comprehensive survival server plugin system featuring a complete economy with balances, payments and leaderboards, a persistent auction house with search, categories and listing management, a player-driven orders system with partial fulfillment and money reservation, a sell system with configurable prices and order integration, homes and teleportation with requests and safe random teleportation, player profiles with friends, messaging and statistics, and polished inventory GUIs for all interfaces. Includes SQLite storage, async database operations, configurable messages and permissions, and full tab completion.
  1. Foundation: establish the Java 21/Paper 1.21.11 plugin, SQLite schema, and asynchronous player-profile persistence.

  2. Transactions: add the economy, then auction listings, buy orders, and selling against shared transaction-safe data.

  3. Player systems: add homes and teleportation, social/stat features, and polished menus.

  4. Operations: add administration and configuration, then verify the integrated features.

Starting with Phase 1 so the later systems have a persistence layer to build on.

Phase 1 is in place: Java 21/Paper 1.21.11 project setup, SQLite schema, and asynchronous player-profile loading and saving. The development checklist tracks the remaining phases.

This is only the foundation so far. Economy commands, auctions, orders, homes, menus, and the other requested systems are not implemented yet.

extrask

do all phases "- [ ] Phase 2: Economy commands, balances, history, leaderboard, and safe transfers.

  • [ ] Phase 3: Persistent auction listings and purchase flows.
  • [ ] Phase 4: Reserved-fund buy orders and order fulfillment.
  • [ ] Phase 5: Configurable item selling and order routing.
  • [ ] Phase 6: Homes, teleport requests, spawn, and safe random teleport.
  • [ ] Phase 7: Profiles, statistics, messaging, friends, ignores, and preferences.
  • [ ] Phase 8: Menus, scoreboards, tab display, and placeholders.
  • [ ] Phase 9: Administration, permissions, and configuration coverage.
  • [ ] Phase 10: Integrated build verification and transaction/restart testing."

all phaeses now. no errors

Kodari AI
KodariNov 1 at 6:56 pm 16
  1. Phase 2: economy, safe transfers, history, leaderboard, and admin controls.

  2. Phase 3: persistent auctions, listing lifecycle, and safe purchases.

  3. Phase 4: reserved-fund buy orders and fulfillment.

  4. Phase 5: configured selling and order routing.

  5. Phase 6: homes, teleport requests, spawn, and safe RTP.

  6. Phase 7: profiles, statistics, messages, friends, ignores, and preferences.

  7. Phase 8: menus, scoreboards, tab display, and placeholders.

  8. Phase 9: administration, permissions, and configuration coverage.

  9. Phase 10: integrated verification and transaction/restart checks.

Starting with Phase 2 and will continue in sequence.

Implemented the core economy, auction house, reserved-fund orders, configured selling, homes and teleportation, player profiles and social commands, scoreboards/tab display, PlaceholderAPI support, and administration. The auction, orders, and selling flows have inventory GUIs; no code comments or AI-directed messages were added.

Phase 10 is not verified: I could not run a Paper 1.21.11 compile or live restart/transaction test in this session, so I can’t promise the build is error-free. The full brief’s home/profile/settings hub menus are also not all present, and a Vault economy provider was not added.

extrask

so,

the sell, add every item. make it all like resonable prices but also you can edit

for sell orders ah everything. add the prefixes like "m" is million. you can also type "million" or for example "t" or "k" yk. k = thousant. t = trillion etc etc.

remove the "ExtraSKś Surviival" prefix ,make it clean messages. make the messages in white or red or green depending.

add /extrasurvivaladmin money give/remove player amount(with prefixes)

add prefixes to anything sellable

so change sell gui, make it like tihs. make it always open a gui, you can put items in. also make this. for every single item in the world. so if i mine a dirt block or wtv. make it show price, show the price set in config.yml so if changes then changes there. add a /extrasurvival reload for admins. remove /back command

make /eco a admin command add a /orders search <item>

also for the /ah sell or order sell, make it a gui if i press on the book it says "type amount in chat" sends bossbar in red. and plays pling sound medium volume. then i type "100(with prefixes)" and it sets books lore to 100$ to show. and then you press item. but when you press items on orders it shows all items in a gui, or first 5 chest show some, in the right corner add arrow and you can serach though. only survial obtainable no barriers etc. so you go diff pages. but for ah:

for ah make it like this, i hold a item ( lets say 22 books ) i type /ah sell <prize>(with prefixes) then it opens a gui 3 chest. in middle theres the item the person held when he sent command ( the item he will sell ) and also it will say amount and name of item in lore. if hes holding 22 and run the command it says 22 books. and on the right side theres green glass that says "Confirm" on the other side red glass (stained for both ) that says "Deny". in red and green text depending on glass ofc.

also make a combat system. when a palyer hits another PLAYER both goes in combat. send a action bar "<red>/&c<time>" it ticks down. starting combat time: 30 but have a option in confix.yml if player is in combat and he dies. simple but steady. they can also not use any tpa commands at all or use homes. or rtp

on /ah the sellers name is in uuid ithink?`its number, make it the sellers ingame username assuming same thing for orders.

Kodari AI
KodariNov 1 at 8:09 pm 13
  1. Redesign the sell GUI and configurable prices for all sellable items, including money suffix parsing.

  2. Clean message formatting, remove /back, and implement the requested admin money, economy, and reload commands.

  3. Add order search and paginated selection of survival-obtainable items.

  4. Implement the auction-house pricing and confirmation GUI, plus in-game seller names.

  5. Add combat tagging, countdown display, teleport restrictions, and death handling.

  1. Sell GUI: /sell now opens a deposit menu, followed by a price preview and confirmation. Prices use sell.prices overrides and sell.default-price for other items. Closing or cancelling returns deposited items.

  2. Messages and commands: Removed the message prefix and set message colors to white, red, or green. Removed /back.

  3. Admin economy: Added /extrasurvivaladmin money give|remove <player> <amount> and /extrasurvival reload. /eco remains operator-only. Amounts accept k, m, b, t, and words such as thousand, million, billion, and trillion.

  4. Orders: /orders opens a paginated item catalog, and selecting an item shows its buy orders. /orders search <item> filters orders. Creative-only items and spawn eggs are excluded; the blacklist is configurable.

  5. Auction house: /ah sell <price> opens a confirmation menu for the entire held stack, with red Deny and green Confirm buttons. /ah sell opens price setup; clicking the book prompts for a price with a red boss bar and a medium-volume pling. Listings show the stack count, and seller names display as usernames rather than UUID fragments. Order listings also show the buyer’s username.

  6. Combat: Added configurable combat tagging, a red action-bar countdown, death cleanup, and restrictions on teleport commands, homes, and RTP while tagged. The timer defaults to 30 seconds in config.yml.

extrask

for stats, make a clean GUI instead of chat message

the /orders or /order command sends a unexpected error? so doenst work

For the AH make it say "20m" instead of like 200000 or wtv. make it actually say if its close to a prefix

also for the sell

make it so the slabs are in the middle, you press on the slabs to set price. then add the sell thing (the green and the red glass ) to that menu. it also

remove cancel button on sale

remove calculate sell buttton, just make it so if you have items in there and press escape it sells, if you dont then it cancels

also make it so i can right-shift items in the gui

Make it say the prize of every item all the time, not only in sales gui. interfere in the game. so every item every time you pick up a item it says lore prize like this "20$" but in green text ofc.

add a trash meny, no buttons, if u put something in it, (right shift works ) and espace (laeve meny ) it trashes

make it say 100m or 100b or 100t instead of just 1000000000 everwhere like in tab etc

Remove the numbers on scoreaboard.

make baltop a gui with playerheads and arrorws to go to differnt pages (10 total )

dont make it automatic home tpa make 3 second cooldown ( says in action bar ) so home and tpa not auto. also rtp

make evrything 100% cooler and no ai ofc. make it cool simplistic and clean

Kodari AI
KodariNov 4 at 6:31 pm 9
  1. Convert stats to a clean GUI and fix the /order//orders error.

  2. Abbreviate large prices consistently, including auction house and tab.

  3. Rework the sell menu: slab price selection, green/red actions, Escape behavior, and right-shift selling.

  4. Show each item’s price in green lore, including after pickup.

  5. Add an Escape-to-trash menu with right-shift support.

  6. Remove scoreboard numbers.

  7. Make /baltop a paginated player-head GUI with up to 10 pages.

  8. Add a 3-second action-bar cooldown to home, TPA, and RTP instead of automatic teleporting.

  9. Apply a clean, simple visual polish without adding AI-themed messages.

  1. Stats: /stats now opens a clean GUI with kills, deaths, and playtime.

  2. Order catalog: /orders and /order now skip XSeries items that fail to load while building the catalog. If the command still errors, the server stack trace is needed to identify any separate cause.

  3. Prices: Added compact K/M/B/T formatting across auction, economy, sell, order, profile, tab, scoreboard, and PlaceholderAPI balance displays.

  4. Sell menu: Added centered slab price multipliers, green sell and red return actions, Escape-to-sell when eligible items are deposited, and right-shift transfers. Removed the calculate and preview-confirmation steps.

  5. Item lore: Picked-up items now receive a green sell-price lore line while preserving their existing lore.

  6. Trash: Added /trash. It has no buttons, accepts right-shift transfers, and discards deposited items when closed.

  7. Scoreboard: Hid the numeric scores beside scoreboard lines.

  8. Baltop: /baltop now opens a player-head leaderboard with arrows and a maximum of 10 pages.

  9. Teleport polish: Home, accepted TPA requests, and RTP now show a 3-second action-bar countdown before teleporting. Kept existing post-teleport cooldowns; the menus use a simple dark style with green and red actions, and no AI-themed messages or code comments were added.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
DEVELOPMENT.md
manifest.kod
settings.gradle
Code
29 6,822
src/main/java/com/extrask/survival/ExtraSurvivalPlugin.java
package com.extrask.survival;

import com.extrask.survival.data.DatabaseManager;
import com.extrask.survival.data.PlayerDataManager;
import com.extrask.survival.auction.AuctionCommand;
import com.extrask.survival.auction.AuctionManager;
import com.extrask.survival.economy.EconomyCommand;
import com.extrask.survival.economy.EconomyManager;
import com.extrask.survival.listener.PlayerDataListener;
import com.extrask.survival.listener.CombatManager;
import com.extrask.survival.orders.OrderCommand;
import com.extrask.survival.orders.OrderManager;
import com.extrask.survival.sell.SellCommand;
import com.extrask.survival.sell.SellManager;
import com.extrask.survival.trash.TrashCommand;
import com.extrask.survival.travel.TravelCommand;
import com.extrask.survival.travel.TravelManager;
import com.extrask.survival.social.SocialCommand;
import com.extrask.survival.social.SocialManager;
import com.extrask.survival.ui.SurvivalPlaceholderExpansion;
import com.extrask.survival.ui.UiManager;
import com.extrask.survival.admin.SystemCommand;
import java.util.concurrent.CompletionException;
import java.util.logging.Level;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;

public final class ExtraSurvivalPlugin extends JavaPlugin {
    private DatabaseManager databaseManager;
    private PlayerDataManager playerDataManager;
    private EconomyManager economyManager;
    private AuctionManager auctionManager;
    private OrderManager orderManager;
    private SellManager sellManager;
    private TravelManager travelManager;
    private CombatManager combatManager;
    private SocialManager socialManager;
    private UiManager uiManager;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        databaseManager = new DatabaseManager(this);
        double maximumBalance = configuredMaximumBalance();
        double startingBalance = getConfig().getDouble("economy.starting-balance", 0.0);
        if (!Double.isFinite(startingBalance) || startingBalance < 0.0 || startingBalance > maximumBalance) {
            startingBalance = 0.0;
            getLogger().warning("Invalid economy.starting-balance. Using 0.0.");
        }
        playerDataManager = new PlayerDataManager(databaseManager, startingBalance);
        economyManager = new EconomyManager(databaseManager, maximumBalance);
        auctionManager = new AuctionManager(databaseManager);
        orderManager = new OrderManager(databaseManager);
        sellManager = new SellManager(databaseManager, orderManager);
        travelManager = new TravelManager(this, databaseManager);
        combatManager = new CombatManager(this);
        combatManager.start();
        socialManager = new SocialManager(databaseManager);
        uiManager = new UiManager(this);
        Bukkit.getPluginManager().registerEvents(new PlayerDataListener(this, playerDataManager), this);
        Bukkit.getPluginManager().registerEvents(travelManager, this);
        Bukkit.getPluginManager().registerEvents(combatManager, this);
        Bukkit.getPluginManager().registerEvents(uiManager, this);
        EconomyCommand economyCommand = new EconomyCommand(this);
        getCommand("balance").setExecutor(economyCommand);
        getCommand("balance").setTabCompleter(economyCommand);
        getCommand("pay").setExecutor(economyCommand);
        getCommand("pay").setTabCompleter(economyCommand);
        getCommand("baltop").setExecutor(economyCommand);
        getCommand("baltop").setTabCompleter(economyCommand);
        getCommand("transactions").setExecutor(economyCommand);
        getCommand("transactions").setTabCompleter(economyCommand);
        getCommand("eco").setExecutor(economyCommand);
        getCommand("eco").setTabCompleter(economyCommand);
        Bukkit.getPluginManager().registerEvents(economyCommand, this);
        AuctionCommand auctionCommand = new AuctionCommand(this);
        getCommand("ah").setExecutor(auctionCommand);
        getCommand("ah").setTabCompleter(auctionCommand);
        Bukkit.getPluginManager().registerEvents(auctionCommand, this);
        OrderCommand orderCommand = new OrderCommand(this);
        getCommand("orders").setExecutor(orderCommand);
        getCommand("orders").setTabCompleter(orderCommand);
        Bukkit.getPluginManager().registerEvents(orderCommand, this);
        SellCommand sellCommand = new SellCommand(this);
        getCommand("sell").setExecutor(sellCommand);
        getCommand("sell").setTabCompleter(sellCommand);
        Bukkit.getPluginManager().registerEvents(sellCommand, this);
        TrashCommand trashCommand = new TrashCommand();
        getCommand("trash").setExecutor(trashCommand);
        Bukkit.getPluginManager().registerEvents(trashCommand, this);
        TravelCommand travelCommand = new TravelCommand(this, combatManager);
        String[] travelCommands = {"sethome", "home", "homes", "delhome", "renamehome", "tpa", "tpaccept", "tpdeny", "tpahere", "rtp", "spawn", "setspawn", "setrtp"};
        for (String name : travelCommands) {
            getCommand(name).setExecutor(travelCommand);
            getCommand(name).setTabCompleter(travelCommand);
        }
        SocialCommand socialCommand = new SocialCommand(this);
        String[] socialCommands = {"friends", "friend", "msg", "reply", "ignore", "settings", "profile", "stats", "enderchest"};
        for (String name : socialCommands) {
            getCommand(name).setExecutor(socialCommand);
            getCommand(name).setTabCompleter(socialCommand);
        }
        Bukkit.getPluginManager().registerEvents(socialCommand, this);
        SystemCommand systemCommand = new SystemCommand(this);
        getCommand("system").setExecutor(systemCommand);
        getCommand("system").setTabCompleter(systemCommand);
        getCommand("extrasurvival").setExecutor(systemCommand);
        getCommand("extrasurvival").setTabCompleter(systemCommand);
        getCommand("extrasurvivaladmin").setExecutor(economyCommand);
        getCommand("extrasurvivaladmin").setTabCompleter(economyCommand);
        uiManager.start();
        if (Bukkit.getPluginManager().getPlugin("PlaceholderAPI") != null) {
            new SurvivalPlaceholderExpansion(this).register();
        }
        databaseManager.ready().whenComplete((ignored, error) -> {
            if (error != null) {
                getLogger().log(Level.SEVERE, "Database initialization failed", unwrap(error));
            }
        });
    }

    @Override
    public void onDisable() {
        if (combatManager != null) {
            combatManager.stop();
        }
        if (uiManager != null) {
            uiManager.stop();
        }
        if (playerDataManager == null || databaseManager == null) {
            return;
        }
        try {
            playerDataManager.saveAll().join();
        } catch (CompletionException exception) {
            getLogger().log(Level.SEVERE, "Unable to save player data during shutdown", unwrap(exception));
        } finally {
            databaseManager.shutdown();
        }
    }

    public PlayerDataManager getPlayerDataManager() {
        return playerDataManager;
    }

    public EconomyManager getEconomyManager() {
        return economyManager;
    }

    public AuctionManager getAuctionManager() {
        return auctionManager;
    }

    public OrderManager getOrderManager() {
        return orderManager;
    }

    public SellManager getSellManager() {
        return sellManager;
    }

    public TravelManager getTravelManager() {
        return travelManager;
    }

    public SocialManager getSocialManager() {
        return socialManager;
    }

    public UiManager getUiManager() {
        return uiManager;
    }

    public void reloadConfiguration() {
        reloadConfig();
        double maximumBalance = configuredMaximumBalance();
        economyManager.setMaximumBalance(maximumBalance);
        double startingBalance = getConfig().getDouble("economy.starting-balance", 0.0);
        if (!Double.isFinite(startingBalance) || startingBalance < 0.0 || startingBalance > maximumBalance) {
            startingBalance = 0.0;
            getLogger().warning("Invalid economy.starting-balance. Using 0.0.");
        }
        playerDataManager.setStartingBalance(startingBalance);
        uiManager.start();
    }

    public void audit(String action, String details) {
        getLogger().info("AUDIT " + action + " " + details);
    }

    public void debug(String message) {
        if (getConfig().getBoolean("debug", false)) {
            getLogger().info("DEBUG " + message);
        }
    }

    private double configuredMaximumBalance() {
        double value = getConfig().getDouble("economy.maximum-balance", 1_000_000_000_000.0);
        if (!Double.isFinite(value) || value <= 0.0) {
            getLogger().warning("Invalid economy.maximum-balance. Using 1000000000000.0.");