Šima

Act as an experienced Minecraft Developer specializing in server setups for version 1.21.11 (Paper / Purpur / Spigot).

I need a complete setup and plugin configuration design for my SHADOW ECONOMY system.

Requirements:

  • Core vault-compatible economy system.
  • Primary commands: /bal, /pay, /eco give/take.
  • PlaceholderAPI support, formatted currency (e.g., 1k, 1M), and configurable starting balance.

Please provide:

  1. The best plugin choice for Shadow Economy.
  2. Primary commands & permissions list.
  3. Essential config snippet (config.yml).
Kodari AI
KodariSep 28 at 4:40 pm 1
ShadowEconomyCore
Vault-compatible economy plugin for Minecraft 1.21.11 servers. Provides /bal, /pay, and /eco give/take commands with configurable starting balance. Integrates PlaceholderAPI for formatted currency display (1k, 1M suffixes). Features permission-based command access, persistent player balances, and a simple YAML configuration for economy tuning. Designed for Shadow Economy server systems.

1. Recommended setup

Use EssentialsX for the economy, Vault as the economy bridge, and PlaceholderAPI for placeholders. Vault is not an economy itself, so avoid installing a second economy plugin that could create provider conflicts. Choose an EssentialsX build compatible with your exact 1.21.11 server jar.

2. Commands and permissions

Command
Permission
Use
/bal
or
/balance
essentials.balance
Check your balance
/bal <player>
essentials.balance.others
Check another player’s balance
/pay <player> <amount>
essentials.pay
Pay another player
/eco give <player> <amount>
essentials.eco
Staff: add money
/eco take <player> <amount>
essentials.eco
Staff: remove money

Give essentials.balance and essentials.pay to regular players. Restrict essentials.balance.others and especially essentials.eco to trusted staff.

3. EssentialsX config.yml

Edit plugins/Essentials/config.yml:

YAML
starting-balance: 250.0

currency-symbol: '$'
currency-symbol-suffix: false
currency-format: '#,##0.##'

starting-balance applies to new players; it does not reset existing balances. The currency format controls normal decimal and grouping display, but EssentialsX does not natively abbreviate values as 1k or 1M. For compact displays, use a PlaceholderAPI-compatible formatter in your scoreboard, GUI, or chat display layer without changing the stored balance.

For PlaceholderAPI balances, install the Vault expansion and use placeholders such as %vault_eco_balance% or %vault_eco_balance_formatted%.

Šima

no se

Kodari AI
KodariSep 28 at 4:41 pm 1

The generation was stopped before any content could be produced.

Šima

now create the files so i can create the plugin

Kodari AI
KodariSep 28 at 4:43 pm 1
  1. Set up the Gradle project and plugin metadata.

  2. Implement persistent balances, commands, Vault economy service, and optional PlaceholderAPI placeholders.

  3. Add the default configuration and permissions.

Creé el proyecto ShadowEconomyCore con economía persistente, integración Vault y soporte opcional para PlaceholderAPI.

  • Comandos: /bal (/balance), /pay <jugador> <cantidad>, /eco give|take <jugador> <cantidad>.

  • Permisos: shadoweconomy.balance y shadoweconomy.pay para jugadores; shadoweconomy.balance.others y shadoweconomy.eco para operadores.

  • Placeholders: %shadoweconomy_balance% y %shadoweconomy_balance_formatted% muestran el saldo abreviado; %shadoweconomy_balance_raw% devuelve el valor numérico.

  • Configuración: starting-balance y formato de moneda están en src/main/resources/config.yml. Los saldos se guardan en plugins/ShadowEconomyCore/accounts.yml.

Para compilar, ejecuta gradle build con Java 21. Instala Vault en el servidor; PlaceholderAPI es opcional. El JAR se genera en build/libs/.

Šima

this is not working on paper 1.21.11 and its like something vault economy

Kodari AI
KodariSep 28 at 5:22 pm 1

ShadowEconomyCore is already written as a Vault Economy provider—it stores its own balances and registers them with Vault. Vault itself is only the bridge; it doesn’t provide balances on its own.

The code requires the Vault plugin to be installed. If Vault is missing or fails to load, ShadowEconomyCore won’t enable. Also, EssentialsX or another plugin may take over /bal, /pay, or /eco; try /shadoweconomycore:bal to check whether the command is being claimed by a conflict.

Please send the server’s startup error (if any), plus whether the issue is loading, commands, or another plugin not seeing the economy. That will identify what needs fixing.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
settings.gradle
Code
11 835
src/main/java/com/kodari/shadoweconomy/ShadowEconomy.java
package com.kodari.shadoweconomy;

import com.kodari.shadoweconomy.account.AccountStore;
import com.kodari.shadoweconomy.command.EconomyCommand;
import com.kodari.shadoweconomy.economy.ShadowEconomyProvider;
import com.kodari.shadoweconomy.listener.PlayerJoinListener;
import com.kodari.shadoweconomy.placeholder.ShadowEconomyExpansion;
import com.kodari.shadoweconomy.util.CurrencyFormatter;
import net.milkbowl.vault.economy.Economy;
import org.bukkit.plugin.ServicePriority;
import org.bukkit.plugin.java.JavaPlugin;

public final class ShadowEconomy extends JavaPlugin {
    private AccountStore accountStore;
    private ShadowEconomyProvider economyProvider;
    private CurrencyFormatter currencyFormatter;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        currencyFormatter = new CurrencyFormatter(this);
        accountStore = new AccountStore(this);
        economyProvider = new ShadowEconomyProvider(this, accountStore);

        getServer().getServicesManager().register(Economy.class, economyProvider, this, ServicePriority.Highest);
        getServer().getPluginManager().registerEvents(new PlayerJoinListener(accountStore), this);

        EconomyCommand commandExecutor = new EconomyCommand(this, accountStore, economyProvider);
        getCommand("bal").setExecutor(commandExecutor);
        getCommand("pay").setExecutor(commandExecutor);
        getCommand("eco").setExecutor(commandExecutor);

        if (getServer().getPluginManager().getPlugin("PlaceholderAPI") != null) {
            new ShadowEconomyExpansion(this).register();
            getLogger().info("PlaceholderAPI expansion registered.");
        }

        getLogger().info("ShadowEconomyCore enabled and registered as the Vault economy provider.");
    }

    @Override
    public void onDisable() {
        if (accountStore != null) {
            accountStore.save();
        }
        getServer().getServicesManager().unregisterAll(this);
    }

    public AccountStore getAccountStore() {
        return accountStore;
    }

    public String formatBalance(double amount) {
        return currencyFormatter.format(amount);
    }
}