A complete economy plugin with 14 languages, ScoreHud integration, offline player support, and a simple API.
A production-ready economy plugin for PocketMine-MP, powered by SimpleSQL.
Built for server owners who want a working economy in minutes and developers who want an API that doesn't fight them.
I know BedrockEconomy exists, and it's a great plugin - recommended on Poggit, actively maintained. So why SimpleEconomy?
Short answer: Different philosophy, different strengths.
| SimpleEconomy | BedrockEconomy | |
|---|---|---|
| Storage | Hybrid SQL + YAML via SimpleSQL | Pure SQL (libasynql) |
| API complexity | 4 methods. That's it. | Full async ClosureAPI / fluent builders |
| Setup | Drop-in, works instantly | Requires understanding async patterns |
| Offline player data | Built-in (temporary sessions) | Requires manual SQL queries |
| ScoreHud integration | Built-in | Separate plugin required |
| Multi-language | 14 languages built-in | 4 languages |
| Transaction events | Cancellable events for third-party control | Custom event system |
| Target audience | Small-to-medium servers, non-dev admins | Advanced setups, dev-oriented |
Why not PR into BedrockEconomy? BedrockEconomy is architecturally pure-SQL. SimpleEconomy's hybrid SQL-YAML approach (via SimpleSQL) is a fundamentally different storage philosophy - this isn't a feature addition, it's a different way of thinking about player data. Both approaches have merit, but they can't coexist in one codebase without compromise.
TL;DR: BedrockEconomy is powerful and flexible. SimpleEconomy is simple and instant. Choose what fits your server.
/money, /pay, /setmoney, /addmoney, /reducemoney, /topmoney/money nh and it finds NhanAZ/topmoney with async cache rebuild$1,000,000 (default) or $1.5M (compact)Download the latest .phar from Poggit CI.
Drop it in your server's plugins/ folder. Done.
| Command | Description | Permission | Default |
|---|---|---|---|
/money [player] | Check your balance, or someone else's | simpleeconomy.command.money | Everyone |
/pay <player> <amount> | Send money to another player | simpleeconomy.command.pay | Everyone |
/topmoney [page] | View the richest players | simpleeconomy.command.topmoney | Everyone |
/setmoney <player> <amount> | Set a player's balance | simpleeconomy.command.setmoney | OP |
/addmoney <player> <amount> | Add money to a player | simpleeconomy.command.addmoney | OP |
/reducemoney <player> <amount> | Remove money from a player | simpleeconomy.command.reducemoney | OP |
Tip: All commands support name prefix matching. If Steve is online, /pay st 100 works.
Tip: Admin commands (/setmoney, /addmoney, /reducemoney) work on offline players too.
After first run, edit plugin_data/SimpleEconomy/config.yml:
# Language (14 supported)
language: "eng"
# Starting balance for new players
default-balance: 1000
# Currency display
currency:
symbol: "$"
formatter: "default" # or "compact" for $1.5K style
# Leaderboard
topmoney-per-page: 10
leaderboard-size: 100
# Database (sqlite or mysql)
database:
type: sqlite
| Code | Language |
|---|---|
eng | English |
vie | Tiếng Việt |
kor | 한국어 |
rus | Русский |
spa | Español |
ukr | Українська |
zho | 简体中文 |
ind | Bahasa Indonesia |
tur | Türkçe |
fra | Français |
por | Português |
deu | Deutsch |
jpn | 日本語 |
ita | Italiano |
All language files are saved to plugin_data/SimpleEconomy/lang/ - you can edit them freely.
If ScoreHud is installed, SimpleEconomy automatically provides these scoreboard tags:
| Tag | Example | Description |
|---|---|---|
{simpleeconomy.balance} | $1,000 | Formatted balance |
{simpleeconomy.rank} | 3 | Leaderboard position |
{simpleeconomy.raw} | 1000 | Raw balance number |
No extra plugins or configuration needed. Just add the tags to your ScoreHud config.
Want a full working example? Check out SimpleEconomyExample - a complete plugin demonstrating how to use the SimpleEconomy API with real commands and event listeners.
use NhanAZ\SimpleEconomy\Main as SimpleEconomy;
// Get the plugin instance
$eco = SimpleEconomy::getInstance();
// Check balance (online players)
$balance = $eco->getMoney("Steve"); // ?int - null if offline
// Modify balance (online players)
$eco->setMoney("Steve", 5000); // bool - false if offline or cancelled
$eco->addMoney("Steve", 500); // bool
$eco->reduceMoney("Steve", 200); // bool - false if insufficient funds
// Format money using the server's configured style
$display = $eco->formatMoney(1500000); // "$1,500,000" or "$1.5M"
That's the entire sync API. 4 methods.
// Works for BOTH online and offline players
$eco->getMoneyAsync("Steve", function(?int $balance): void {
if ($balance !== null) {
// Steve has played before, balance is $balance
} else {
// Steve has never joined
}
});
SimpleEconomy fires events that your plugin can listen to:
TransactionSubmitEvent - fired before a transaction executes. Cancellable.
use NhanAZ\SimpleEconomy\event\TransactionSubmitEvent;
use NhanAZ\SimpleEconomy\event\TransactionEvent;
public function onTransaction(TransactionSubmitEvent $event): void {
// Block payments over $10,000
if ($event->type === TransactionEvent::TYPE_PAY && $event->getAmount() > 10000) {
$event->cancel();
}
}
TransactionSuccessEvent - fired after a transaction completes. Read-only.
use NhanAZ\SimpleEconomy\event\TransactionSuccessEvent;
public function onSuccess(TransactionSuccessEvent $event): void {
$this->getLogger()->info("{$event->playerName}: {$event->oldBalance} → {$event->newBalance}");
}
| Property | Type | Description |
|---|---|---|
$event->playerName | string | The player involved |
$event->oldBalance | int | Balance before the transaction |
$event->newBalance | int | Balance after the transaction |
$event->type | string | "set", "add", "reduce", or "pay" |
$event->getAmount() | int | Absolute difference between old and new |
For commands or features that need to work on offline players:
$eco->withPlayerSession("Steve", function(Session $session, bool $temporary) use ($eco): void {
$balance = (int) $session->get("balance", 0);
// Do something with the balance...
// IMPORTANT: close temp sessions when done
if ($temporary) {
$eco->closeTempSession("Steve");
}
}, function(string $error): void {
// Handle error (e.g., data still loading)
});
// Get top 10 players
$top = $eco->getTopBalances(limit: 10, offset: 0);
// Returns: [["name" => "steve", "balance" => 50000], ...]
// Get a player's rank
$rank = $eco->getPlayerRank("Steve"); // ?int - null if not in cache
// Total cached entries
$count = $eco->getBalanceCacheCount();
I plan to submit PRs to major multi-economy libraries once SimpleEconomy is approved on Poggit:
| Library | Type | Config value | PR Status |
|---|---|---|---|
| libPiggyEconomy | Provider | "simpleeconomy" | Planned |
| MoneyConnector | Connector | "simpleeconomy" | Planned |
| Economizer | Transistor | "SimpleEconomy" | Planned |
| libEco | Auto-detect | - | Planned |
| Capital | Migration source | "simpleeconomy" | Planned |
Once these PRs are merged, plugins using these libraries (shop plugins, auction plugins, etc.) will automatically work with SimpleEconomy without any code changes on their end.
SimpleEconomy/
├── plugin.yml
├── LICENSE
├── resources/
│ ├── config.yml
│ ├── simplesql/
│ │ ├── mysql.sql
│ │ └── sqlite.sql
│ └── lang/
│ ├── eng.yml # English
│ ├── vie.yml # Tiếng Việt
│ ├── kor.yml # 한국어
│ └── ... (14 languages)
└── src/NhanAZ/SimpleEconomy/
├── Main.php # Core plugin + API
├── LangManager.php # Multi-language system
├── CurrencyFormatter.php # $1,000 / $1K formatting
├── LeaderboardTask.php # Async cache builder
├── ScoreHudListener.php # ScoreHud integration
├── command/
│ ├── MoneyCommand.php
│ ├── PayCommand.php
│ ├── SetMoneyCommand.php
│ ├── AddMoneyCommand.php
│ ├── ReduceMoneyCommand.php
│ └── TopMoneyCommand.php
└── event/
├── TransactionEvent.php # Base event
├── TransactionSubmitEvent.php # Pre-transaction (cancellable)
└── TransactionSuccessEvent.php # Post-transaction
MIT License - do whatever you want with it.