
Treasury
An bridge layer to provide economy and points implementations
About this Mod
Treasury
A simple economy & points API for Minecraft mods.
Inspired by the Bukkit Vault plugin.
It is not an economy implementation.
Instead, like Vault, other mods provide economy/points implementations, and Treasury acts as a bridge layer.
We need a good logo lmao, my art sucks —— the author
What can it do?
- Hold server economy (multi-currency supported)
- Access points / premium currency
- Allow mods to interact economy system without depending on specific implementations
How it works
Treasury defines two main provider types:
EconomyProviderfor normal currencyPointsProviderfor points (most for premium currency)
Other mods register their implementation, and other developers who use the API can get them.
See more below.
Registry
Economy
- Stored in
EconomyServiceRegistry - Supports multiple providers
- One provider is selected as primary
Selection rules:
- Using
primaryEconomywhich defined in config if specified - Otherwise, use the first registered provider
Points
- Stored in
PointsServiceRegistry - Only one provider allowed
Registering another provider will throw an exception.
Register Providers
Economy
Treasury.economy().register(new ExampleEconomyProvider());
Points
Treasury.points().register(new ExamplePointsProvider());
Notes:
- Only one points provider allowed
- Please register during mod initialization
Fabric Entrypoints
Treasury supports register providers via Fabric entrypoints:
treasury-economytreasury-points
Example:
{
"entrypoints": {
"treasury-economy": [
"com.example.mod.ExampleEconomyProvider"
],
"treasury-points": [
"com.example.mod.ExamplePointsProvider"
]
}
}
Usage
Economy
if (Treasury.economy().hasPrimary()) {
EconomyProvider economy = Treasury.economy().getPrimary();
double balance = economy.getBalance(playerUuid);
}
Points
if (Treasury.points().isRegistered()) {
PointsProvider points = Treasury.points().get();
int balance = points.getBalance(playerUuid);
}
Commands
/treasury info/treasury balance <player>
Required permission level: 2
Requirements
- Fabric: Minecraft
1.20.1+, any Fabric version, Fabric API is not required - NeoForge: Minecraft
1.20.4+, any NeoForge version - Java:
17or higher
Don't ask for Forge!
Build
./gradlew build
Import
dependencies {
compileOnly("io.github.lijinhong11:treasury:VERSION")
}
Available Versions
How to Install Treasury on Your Server
Order Server
Order a Minecraft Java server with at least 3 GB RAM (4 GB recommended).
Set fabric Loader
In the panel under "Egg", select the fabric loader and matching Minecraft version (26.1.2).
Install Mod
Open the mod browser in the dashboard and search for "Treasury". Click "Install" – done! Alternatively, upload the .jar via SFTP to the /mods folder.
Compatibility
Mod Loaders
Minecraft Versions
26.1.2, 26.1.1, 26.1 (+19 more)
Server-side
✓ RequiredRecommended RAM
4 GB(min. 3 GB)Frequently Asked Questions
Treasury server crashes on startup – what to do?
Most common cause: wrong fabric version or insufficient RAM. Check the server log (latest.log) for "OutOfMemoryError" or "Mixin" errors. With Mado Hosting: ensure at least 3 GB RAM is allocated and the loader matches the mod version (26.1.2). You can switch loaders with one click in the panel.
Is Treasury compatible with fabric and neoforge?
Treasury officially supports fabric, neoforge for Minecraft 26.1.2, 26.1.1, 26.1. The Mado dashboard automatically detects incompatible loader combinations.
Server lagging with Treasury – how to optimize performance?
Recommended RAM: 4 GB (per 8 players). Use /spark profiler to check if Treasury consumes the most tick time. Common fixes: reduce server view-distance to 8-10, install "performant" or "starlight" as supplementary mods on Forge. With Mado Hosting, your server runs on NVMe SSDs with dedicated CPU cores for minimal latency.
Similar Mods
Rent Modded Server
Install Treasury with just one click on your server.