A fully backward-compatible, modern economy API for Minecraft servers.
Drop-in replacement for Vault 1.7.3-b131 with multi-currency, async/Folia support, web API, GUI framework, and unified storage.
- Identical
Economy,EconomyResponse, andAbstractEconomysignatures to Vault 1.7.3-b131 - All old plugins work without recompilation
- Legacy bridge auto-registers
net.milkbowl.vault.economy.Economyservice
- UUID-based API (like Vault 2.5.0) —
EconomyV2interface - Folia-safe async —
depositPlayerAsync(),withdrawPlayerAsync() - Multi-currency —
CurrencyDefinition,getCurrencies(),setActiveCurrency() - Atomic transfers —
transferPlayer()in one call - Transaction history —
TransactionRecord,getTransactionHistory() - Leaderboards —
getTopBalances(int)+ async variants - GUI Framework —
EconomyGUI,GUIManagerready for menus - Web API Server — Built-in HTTP server (
/health,/api/balance) - Unified Storage —
EconomyStorageinterface (SQLite/MySQL/Redis ready) - PlaceholderAPI —
%vaultx_balance%,%vaultx_currency% - i18n — Multi-language support via
I18nManager
| Platform | Version |
|---|---|
| Paper | 1.21.4+ |
| Purpur | 1.21.4+ |
| Folia | 1.21.4+ |
| DivineMC | 1.21.x |
| Leaf | 1.21.x |
| Pufferfish | 1.21.x |
- Download
VaultX2.0.jarfrom Releases - Place in your server's
plugins/folder - Restart server
- Install an economy provider plugin (EssentialsX, CMI, etc.)
<repositories>
<repository>
<id>papermc</id>
<url>https://repo.papermc.io/repository/maven-public/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>net.milkbowl.vaultx</groupId>
<artifactId>vaultx-api</artifactId>
<version>2.0.0</version>
</dependency>
</dependencies>public class MyEconomy extends AbstractEconomyV2 {
@Override
public boolean isEnabled() { return true; }
@Override
public String getName() { return "MyEconomy"; }
@Override
public boolean hasAccount(String playerName) {
// Check if account exists
return true;
}
@Override
public double getBalance(String playerName) {
// Get balance from your storage
return 1000.0;
}
@Override
public boolean has(String playerName, double amount) {
return getBalance(playerName) >= amount;
}
@Override
public EconomyResponse withdrawPlayer(String playerName, double amount) {
if (!hasAccount(playerName)) {
return EconomyResponse.fail(amount, 0.0, "ACCOUNT_NOT_FOUND", "ACCOUNT_NOT_FOUND");
}
final double balance = getBalance(playerName);
if (balance < amount) {
return EconomyResponse.fail(amount, balance, "INSUFFICIENT_FUNDS", "INSUFFICIENT_FUNDS");
}
// Deduct from storage
return EconomyResponse.success(amount, balance - amount);
}
@Override
public EconomyResponse depositPlayer(String playerName, double amount) {
if (!hasAccount(playerName)) {
return EconomyResponse.fail(amount, 0.0, "ACCOUNT_NOT_FOUND", "ACCOUNT_NOT_FOUND");
}
// Add to storage
return EconomyResponse.success(amount, getBalance(playerName) + amount);
}
@Override
public boolean createPlayerAccount(String playerName) {
// Create account in storage
return true;
}
}public class MyEconomyPlugin extends JavaPlugin {
@Override
public void onEnable() {
VaultXBukkit.get().registerProvider(new MyEconomy());
}
}// Get economy service
Economy economy = VaultX.getEconomy();
EconomyV2 economyV2 = VaultX.getEconomyV2();
// Legacy style (Vault 1.x compatible)
EconomyResponse response = economy.depositPlayer(player, 100.0);
// Modern style (UUID-based)
economyV2.depositPlayerAsync(player, 100.0)
.thenAccept(resp -> player.sendMessage("New balance: " + resp.balance));
// Multi-currency
economyV2.setActiveCurrency("GOLD");
economyV2.setPlayerCurrency(player, "USD");
// Atomic transfer
EconomyResponse transfer = economyV2.transferPlayer(from, to, 50.0, "default", true);
// Leaderboard
List<LeaderboardEntry> top10 = economyV2.getTopBalances(10);VaultX/
├── vaultx-api/ ← Pure API module
│ └── net/milkbowl/vaultx/
│ ├── VaultX.java ← Static facade
│ ├── economy/
│ │ ├── Economy.java ← Legacy interface (Vault 1.x compatible)
│ │ ├── EconomyV2.java ← Modern interface (UUID, async, multi-currency)
│ │ ├── AbstractEconomy.java
│ │ ├── AbstractEconomyV2.java
│ │ ├── EconomyResponse.java
│ │ ├── CurrencyDefinition.java
│ │ ├── TransactionRecord.java
│ │ ├── LeaderboardEntry.java
│ │ ├── EconomyContext.java
│ │ ├── EconomyEvent.java
│ │ ├── BankAccount.java
│ │ ├── CurrencyConverter.java
│ │ └── EconomyService.java
│ ├── storage/
│ │ └── EconomyStorage.java
│ ├── web/
│ │ ├── EconomyWebAPI.java
│ │ └── WebAPIConfig.java
│ ├── i18n/
│ │ └── I18nManager.java
│ └── util/
│ ├── UUIDUtils.java
│ └── TranslationKey.java
├── vaultx-bukkit/ ← Bukkit/Paper/Folia implementation
│ ├── plugin.yml
│ ├── config.yml
│ └── net/milkbowl/vaultx/bukkit/
│ ├── VaultXBukkit.java
│ ├── command/
│ │ └── VaultXCommand.java
│ ├── config/
│ │ └── VaultXConfig.java
│ ├── economy/
│ │ ├── VaultXEconomyService.java
│ │ └── ExampleVaultXEconomyProvider.java
│ ├── gui/
│ │ ├── EconomyGUI.java
│ │ └── GUIManager.java
│ ├── web/
│ │ └── WebAPIServer.java
│ ├── placeholder/
│ │ └── VaultXPlaceholder.java
│ └── scheduler/
│ └── VaultXScheduler.java
├── pom.xml ← Maven parent POM
├── VaultX2.0.jar ← Pre-built plugin
├── README.md ← This file (English)
├── README_zh.md ← Chinese description
└── LICENSE ← AGPL-3.0
# Clone the repository
git clone https://github.com/yourusername/VaultX.git
cd VaultX
# Build
mvn clean package
# Output: vaultx-bukkit/target/vaultx-bukkit-2.0.0.jarpublic interface Economy {
boolean isEnabled();
String getName();
boolean hasBankSupport();
int fractionalDigits();
String format(double amount);
String currencyNamePlural();
String currencyNameSingular();
// Account queries
boolean hasAccount(String playerName);
boolean hasAccount(OfflinePlayer player);
boolean hasAccount(String playerName, String worldName);
// Balance queries
double getBalance(String playerName);
double getBalance(OfflinePlayer player);
double getBalance(String playerName, String worldName);
// ... and more
}public interface EconomyV2 extends Economy {
// UUID-based methods
boolean hasAccount(UUID uuid);
double getBalance(UUID uuid);
EconomyResponse withdrawPlayer(UUID uuid, double amount);
EconomyResponse depositPlayer(UUID uuid, double amount);
// Async methods
CompletableFuture<EconomyResponse> depositPlayerAsync(OfflinePlayer player, double amount);
CompletableFuture<EconomyResponse> withdrawPlayerAsync(OfflinePlayer player, double amount);
// Multi-currency
Map<String, CurrencyDefinition> getCurrencies();
String getActiveCurrency();
boolean setActiveCurrency(String currencyCode);
// Transfers
EconomyResponse transferPlayer(OfflinePlayer from, OfflinePlayer to,
double amount, String worldName, boolean autoCreate);
// History & Leaderboards
List<TransactionRecord> getTransactionHistory(OfflinePlayer player, int limit);
List<LeaderboardEntry> getTopBalances(int limit);
}// Open balance menu
GUIManager.openBalanceMenu(player);
// Create custom GUI
EconomyGUI gui = new EconomyGUI(player);
gui.open();// Start web server
WebAPIServer server = new WebAPIServer(8080);
server.start();
// Endpoints:
// GET /health - Health check
// GET /api/balance?uuid=xxx¤cy=USD - Player balance
// GET /api/leaderboard?currency=USD&limit=10 - Top balances
// POST /api/transfer - Transfer fundsVaultX supports multiple languages out of the box:
// Get translated string
String message = I18nManager.get(TranslationKey.ECONOMY_BALANCE);
// Use custom locale
String message = I18nManager.get(Locale.CHINESE, TranslationKey.ECONOMY_BALANCE);Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0).
This means:
- ✅ You can use, modify, and distribute this software
- ✅ You must keep the same license for derivatives
- ✅ You must disclose the source code when serving the modified version over a network
- ✅ You must state changes made to the code
See LICENSE for full details.
- Original Vault by cereal, Sleaker, mung3r
- VaultX Contributors
- Inspired by Vault 2.5.0 community fork
- GitHub Issues - Bug reports and feature requests
- GitHub Discussions - Questions and community chat
- Core Economy API (Vault 1.x compatible)
- UUID-based EconomyV2 interface
- Folia-safe async operations
- Multi-currency support
- GUI Framework
- Web API Server
- PlaceholderAPI integration
- i18n support
- SQLite/MySQL unified storage implementation
- Complete Web Dashboard (HTML/JS)
- ChestShop / QuickShop compatibility layer
- Player Market system
- More language packs (zh_CN, ja_JP, ko_KR)
VaultX 2.0 — Built for the modern Minecraft economy ecosystem.