Installation
Get CoinsX running on your server in under a minute.
- 1Download the latest
CoinsX.jarfrom the AERIUMSTUDIO resource page. - 2Drop the jar into your server's
/plugins/folder. - 3Restart your server. CoinsX will generate its config files at
plugins/CoinsX/. - 4(Optional) Install PlaceholderAPI to enable
%coinsx_..%placeholders. - 5Open a port (default
8765) in your firewall if you want to use the Web API / leaderboard website.
Configuration
Main settings are in plugins/CoinsX/config.yml. Every option is commented inline.
config.yml
# Default currency when none is specified default-currency: coins database: type: sqlite # sqlite | mysql mysql: host: localhost port: 3306 database: coinsx username: root password: '' web-api: enabled: true port: 8765 secret-token: 'change_me_please' # for POST endpoints cors-origin: '*' # your website origin or * leaderboard-cache-seconds: 30 economy: default-starting-balance: 0.0 max-balance: 0 # 0 = no limit allow-negative: false min-pay-amount: 1.0 pay-tax: 0.0 # percentage, 0 = no tax leaderboard: entries-per-page: 10 refresh-interval: 60 # seconds
Currency Config (Currency/coins.yml)
name: '<gradient:#f5a623:#f9d05e>Coins</gradient>' name-plain: Coins symbol: ⛃ symbol-position: before # before | after decimal-places: 0 starting-balance: 0 compact-format: true # 1500 → 1.5K payable: true show-in-leaderboard: true placeholder-enabled: true
Commands
All commands support tab-completion. <required> · [optional]
Player Commands
| Command | Description | Alias |
|---|---|---|
/balance [currency] [player] | Check your or another player's balance. | /bal |
/coins <currency> balance [player] | Check balance for a specific currency. | /coinsx |
/coins <currency> pay <player> <amount> | Transfer currency to another player. | — |
/baltop [currency] [page] | View the richest players on the leaderboard. | — |
Admin Commands
| Command | Description |
|---|---|
/cxa give <player> <currency> <amount> | Add balance. Supports shorthand: 100k, 2.5m, 1b, 500t. |
/cxa take <player> <currency> <amount> | Remove balance from a player. |
/cxa set <player> <currency> <amount> | Set a player's balance exactly. |
/cxa reset <player> <currency> | Reset a player to their starting balance. |
/cxa currencies | List all registered currencies. |
/cxa createcurrency <id> <name> <symbol> | Create a new currency in-game. |
/cxa deletecurrency <id> | Permanently delete a currency and all its data. |
/cxa reload | Reload config, lang, and currency files. |
/coinsadmin has the alias /cxa for faster admin usage. Amount supports shorthand: 100k = 100,000 · 2.5m = 2,500,000 · 1b = 1,000,000,000.Permissions
All permissions follow the coinsx.* namespace. OP players inherit all permissions by default.
| Permission | Description | Default |
|---|---|---|
coinsx.use | Basic plugin usage. | Everyone |
coinsx.balance | Check your own balance. | Everyone |
coinsx.balance.others | Check other players' balances. | OP |
coinsx.baltop | View the leaderboard via /baltop. | Everyone |
coinsx.pay | Send currency to other players. | Everyone |
coinsx.admin | Access to all admin commands. | OP |
coinsx.admin.give | Give currency to a player. | OP |
coinsx.admin.take | Take currency from a player. | OP |
coinsx.admin.set | Set a player's exact balance. | OP |
coinsx.admin.reset | Reset a player's balance. | OP |
coinsx.admin.reload | Reload the plugin. | OP |
coinsx.admin.createcurrency | Create new currencies in-game. | OP |
coinsx.admin.deletecurrency | Delete currencies in-game. | OP |
PlaceholderAPI
Replace <currency> with your currency ID (e.g. coins, tokens). Replace <rank> with a number like 1, 2, 3…
Player Balance
| Placeholder | Returns | Example |
|---|---|---|
%coinsx_balance_<currency>% | Balance with commas, no symbol. | 1,500 |
%coinsx_balance_formatted_<currency>% | Balance with symbol + commas. | ⛃1,500 |
%coinsx_balance_compact_<currency>% | Compact format with symbol. | ⛃1.5K |
%coinsx_balance_raw_<currency>% | Raw double value, no formatting. | 1500.0 |
Leaderboard (by Rank)
| Placeholder | Returns | Example |
|---|---|---|
%coinsx_top_name_<currency>_<rank>% | Player name at that rank. | Notch |
%coinsx_top_uuid_<currency>_<rank>% | Player UUID at that rank. | 069a79f4-… |
%coinsx_top_balance_<currency>_<rank>% | Balance at that rank with commas. | 50,000 |
%coinsx_top_formatted_<currency>_<rank>% | Formatted balance with symbol. | ⛃50,000 |
%coinsx_top_compact_<currency>_<rank>% | Compact balance at that rank. | ⛃50K |
Player Rank & Stats
| Placeholder | Returns | Example |
|---|---|---|
%coinsx_rank_<currency>% | The player's rank on the leaderboard. | 7 |
%coinsx_total_players_<currency>% | Total registered players. | 342 |
%coinsx_currency_name_<currency>% | Display name of the currency. | Coins |
%coinsx_currency_symbol_<currency>% | Symbol of the currency. | ⛃ |
Web API — Overview
CoinsX ships with a built-in HTTP server. No extra software needed — just open the port and start making requests.
http://YOUR_SERVER_IP:PORTThe port is configurable in
config.yml under web-api.port. Make sure that port is open and allocated in your server panel.
coinsx_proxy.php) on your web server to forward requests server-side — no mixed content issues.
Web API — Endpoints
All public GET endpoints require no authentication.
GET /api/currencies
Returns a list of all registered currencies.
GET /api/leaderboard/{currency}
Returns the top 100 players for a currency. Supports pagination via query params.
| Query Param | Default | Description |
|---|---|---|
page | 1 | Page number. |
per_page | 100 | Results per page (max 100). |
GET /api/player/{uuid}/{currency}
Returns the balance of a specific player by UUID.
GET /api/stats
Returns live server and economy stats.
Web API — Protected Endpoints
These POST endpoints modify balances. They require a Bearer token set in your config.yml.
Request Format
POST /api/give Authorization: Bearer your_secret_token Content-Type: application/json { "uuid": "069a79f4-44e9-4726-a5be-fca90e38aaf5", "name": "Notch", "currency": "coins", "amount": 500 }
| Endpoint | Action |
|---|---|
POST /api/give | Add amount to the player's current balance. |
POST /api/take | Subtract amount from the player's balance (floors at 0). |
POST /api/set | Set the player's balance to exactly amount. |
Tutorial — Setup API Server
Before building your website, make sure CoinsX's Web API is reachable from outside your server.
- 1In
config.yml, setweb-api.enabled: trueand choose a port that is allocated in your panel. - 2Make sure the port is allocated in Pterodactyl (or open in your VPS firewall:
ufw allow PORT/tcp). - 3Change
secret-tokento a strong random string — this protects your POST endpoints. - 4Upload
coinsx_proxy.php+coinsx_config.phpto your website'sbackend/folder to bypass HTTPS restrictions. - 5Test the proxy: visit
https://yoursite.com/backend/coinsx_proxy.php?path=/api/stats— you should see JSON.
Tutorial — Build a Leaderboard Page
A complete working leaderboard page using vanilla HTML + JavaScript + PHP proxy. No frameworks needed.
leaderboard.html// Call your PHP proxy instead of the MC server directly const PROXY = 'backend/coinsx_proxy.php'; async function fetchJson(path) { const [cleanPath, qs] = path.split('?'); let url = PROXY + '?path=' + encodeURIComponent(cleanPath); if (qs) url += '&' + qs; const r = await fetch(url); return r.json(); } async function loadLeaderboard() { const data = await fetchJson('/api/leaderboard/coins?per_page=10'); const tbody = document.getElementById('lb'); tbody.innerHTML = ''; for (const entry of data.entries) { tbody.innerHTML += `<tr> <td>#${entry.rank}</td> <td>${entry.name}</td> <td>${entry.formattedCompact}</td> </tr>`; } } loadLeaderboard(); setInterval(loadLeaderboard, 30000); // refresh every 30s
entry.formattedCompact for compact display (⛃1.5K) and entry.formatted as a hover tooltip for the full value (⛃1,500).Tutorial — Player Balance Lookup
Let players look up their own balance (or any player's) by UUID on your website.
balance.htmlasync function lookupBalance() { const uuid = document.getElementById('uuid').value.trim(); const currency = document.getElementById('currency').value.trim(); if (!uuid || !currency) return; const data = await fetchJson(`/api/player/${uuid}/${currency}`); if (data.success) { document.getElementById('result').textContent = `${data.name ?? uuid}: ${data.formattedCompact} (${data.formatted})`; } else { document.getElementById('result').textContent = 'Player not found.'; } }
Tutorial — Admin Panel (Give/Take/Set)
Use the protected POST endpoints from a server-side backend — never call these from the browser directly as that would expose your secret token.
PHP Example
admin.php<?php require_once 'coinsx_config.php'; function coinsx_give($uuid, $name, $currency, $amount) { $ch = curl_init(COINSX_URL . '/api/give'); curl_setopt_array($ch, [ CURLOPT_POST => true, CURLOPT_RETURNTRANSFER => true, CURLOPT_HTTPHEADER => [ 'Content-Type: application/json', 'Authorization: Bearer ' . COINSX_KEY ], CURLOPT_POSTFIELDS => json_encode([ 'uuid' => $uuid, 'name' => $name, 'currency' => $currency, 'amount' => $amount ]) ]); $r = json_decode(curl_exec($ch), true); curl_close($ch); return $r; } // Usage $r = coinsx_give('069a79f4-...', 'Notch', 'coins', 500); echo "New balance: " . $r['newBalance']; ?>
Java Developer API
Hook into CoinsX from your own plugins using the CoinsXAPI class.
MyPlugin.java// Get the API instance CoinsXAPI api = CoinsX.getInstance().getAPI(); // Check balance double balance = api.getBalance(player, "coins"); // Give coins api.give(player, "coins", 500); // Take coins (returns false if not enough) boolean success = api.take(player, "coins", 100); // Set exact balance api.setBalance(player, "coins", 1000); // Check if player has enough boolean hasEnough = api.has(player, "coins", 250); // Get top 10 leaderboard List<LeaderboardEntry> top = api.getLeaderboardPage("coins", 1, 10); for (LeaderboardEntry entry : top) { plugin.getLogger().info("#" + entry.getRank() + " " + entry.getName() + ": " + entry.getBalance()); }
softdepend in your plugin.yml: softdepend: [CoinsX]Currency Config Reference
Each file in plugins/CoinsX/Currency/ defines one currency. The filename (without .yml) is the currency ID.
| Key | Type | Description |
|---|---|---|
name | String | Display name. Supports MiniMessage formatting (gradients, hex colors). |
name-plain | String | Plain text name for places that don't support color. |
symbol | String | Currency symbol (e.g. ⛃, $, T). |
symbol-position | String | before or after the amount. |
decimal-places | Integer | How many decimal places to display. 0 for whole numbers. |
starting-balance | Double | Balance new players start with. |
compact-format | Boolean | Enable compact display: 1500 → 1.5K, 2000000 → 2M. |
payable | Boolean | Whether players can /coins pay this currency. |
show-in-leaderboard | Boolean | Whether this currency appears in /baltop and the web leaderboard. |
placeholder-enabled | Boolean | Whether PlaceholderAPI placeholders work for this currency. |