Treasury

Treasury

An bridge layer to provide economy and points implementations

by
99 Downloads
fabricneoforgeeconomylibraryutility
Rent Server with this Mod

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:

  • EconomyProvider for normal currency
  • PointsProvider for 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:

  1. Using primaryEconomy which defined in config if specified
  2. 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-economy
  • treasury-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: 17 or higher

Don't ask for Forge!

Build

./gradlew build

Import

dependencies {
    compileOnly("io.github.lijinhong11:treasury:VERSION")
}

Available Versions

1.0.3 - 26.1.X (Fabric)release
MC 26.1, 26.1.1, 26.1.2fabric
April 18, 2026
1.0.3 - 1.20.1 ~ 1.21.11 (Fabric)release
MC 1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6, 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9, 1.21.10, 1.21.11fabric
April 18, 2026
1.0.3 - 1.20.4 ~ 26.1.X (NeoForge)release
MC 1.20.4, 1.20.5, 1.20.6, 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9, 1.21.10, 1.21.11, 26.1, 26.1.1, 26.1.2neoforge
April 18, 2026
1.0.2 - 1.20.1 ~ 26.1.X (NeoForge)release
MC 1.20.4, 1.20.5, 1.20.6, 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9, 1.21.10, 1.21.11, 26.1, 26.1.1, 26.1.2neoforge
April 11, 2026
1.0.2 - 1.20.1 ~ 1.21.11release
MC 1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6, 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9, 1.21.10, 1.21.11fabric
April 11, 2026

How to Install Treasury on Your Server

1

Order Server

Order a Minecraft Java server with at least 3 GB RAM (4 GB recommended).

2

Set fabric Loader

In the panel under "Egg", select the fabric loader and matching Minecraft version (26.1.2).

3

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

fabricneoforge

Minecraft Versions

26.1.2, 26.1.1, 26.1 (+19 more)

Server-side

Required

Recommended 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.

Rent Modded Server

Install Treasury with just one click on your server.

Recommended RAM
4 GBab €8/mo
Min. 3 GB | +1 GB pro 8 Spieler
Create Server Now
1-Click Mod Install
NVMe SSD Storage
DDoS Protection included

Details

License
GNU General Public License v3.0 only
Server-side
Required

Supported Versions

26.1.226.1.126.11.21.111.21.101.21.91.21.81.21.71.21.61.21.5+12 more