Withdraw & Banknotes
Mint Denarius, Auctoritas, Civitas, or Aureus into physical, tradable banknotes — secured by serials and HMAC.
Banknotes are physical, tradable items that represent a fixed amount of currency. Mint one with /withdraw, hand it to another player, drop it in a chest, or stash it in your vault — then the holder redeems it (right-click or a slash command) to fold the value back into a wallet balance. Banknotes power Imperium's player-to-player currency trades, large-denomination bets, and high-value gifts. They are also one of the most security-hardened systems in the plugin: every note is signed, serialised, and atomic-burned on redeem to make duplication impossible.
Supported Currencies
Each currency mints as a distinct item with its own material, colour, symbol, and denomination limits. The defaults:
| Currency | Material | Min Withdraw | Max Withdraw | Symbol |
|---|---|---|---|---|
| Denarius (money) | Gold Nugget | 1,000 | 1B (1.0E9) | ⛁ |
| Auctoritas (tokens) | Sunflower | 100 | 10M (1.0E7) | ⚡ |
| Civitas (beacons) | Beacon | 10 | 1M (1,000,000) | ✨ |
| Aureus (gc) | Emerald | 1 | 100K (100,000) | 🪙 |
Amounts below the minimum or above the maximum are refused before any balance is touched, so you can't accidentally mint a worthless note or hit a precision ceiling.
Withdrawing Currency
To mint a banknote, run /withdraw withdraw <amount> <currency>. The amount accepts plain numbers and the suffixes k, m, and b — so 10k, 1.5m, and 2.5b all work.
- The system validates the amount is within the per-currency min/max.
- Your balance is checked — if you don't have enough, the mint is refused (no partial withdrawal).
- A 2-second global cooldown prevents spam-clicking mints.
- Currency is atomically removed from your wallet.
- A fresh serial is INSERTed into
banknote_serials— if that INSERT fails, the mint aborts and your wallet is refunded. - The banknote item is created, signed, and added to your inventory. If your inventory is full, the mint aborts and refunds.
/withdraw withdrawall <currency> is the quick version: it withdraws your entire balance of that currency as a single note, subject to the minimum and maximum.
Banknote Anatomy
A minted banknote carries everything needed to verify and redeem it, baked into its persistent data container:
- Display name: "<Currency> Banknote" (e.g. "Denarius Banknote").
- Lore: amount (with symbol), currency, owner name, issue date, and a "RIGHT-CLICK to redeem" hint.
- Serial: a random UUID, persisted server-side as the single source of truth.
- Signature: an HMAC-SHA256 over
currency|amount|owner|serial, keyed by the server'ssignature_salt.
The lore is human-readable; the serial and signature are what the plugin actually trusts. Even if someone edits the lore to claim a fake amount, the signature won't match and the redeem is refused.
Redeeming Banknotes
There are three ways to redeem:
- Right-click the note in your hand — instant redeem of that single note.
/withdraw hand— same thing, for the note in your main hand./withdraw redeem <currency>— bulk-redeem every banknote of that currency in your inventory at once.
The redeem flow is deliberately credit-first: your wallet is credited and verified, then the serial is burned, then the item is destroyed. If anything fails mid-flow — a DB hiccup, a race with another redeemer — the credit is reversed and the note is left intact in your inventory. You never lose money to a transient failure.
Security: Serials, Signatures, and Anti-Dupe
Banknotes are a prime dupe target, so the system is layered. Each layer closes a specific historical exploit:
| Layer | What it stops |
|---|---|
| Unique serial | Every minted note gets a random UUID serial persisted to banknote_serials before the item is created. |
| HMAC-SHA256 signature | Binds currency, amount, owner, and serial with a server-side salt so tampering with the item is detectable. |
| Atomic serial burn | On redeem, a conditional UPDATE (WHERE redeemed_at IS NULL) is the single atomic decision — exactly one concurrent redeemer wins. |
| Credit-first redemption | Your balance is credited and verified BEFORE the serial is burned — a DB failure leaves the note intact, not destroyed. |
| Stack refusal | A banknote stack with amount > 1 is refused at redeem — only single-count notes ever mint, so a stack can only exist via a dupe. |
| Configurable cooldown | A short per-player global_cooldown (default 2s) slows bulk minting and smooths DB load. |
The serial burn is the load-bearing wall. Two players (or one player with two windows) trying to redeem the same serial at the same instant both run the conditional UPDATE — but only one transaction sees updated == 1 and commits. The other rolls back, has its credit reversed, and keeps the note (with a clear "already redeemed" error).
Inspecting Your Banknotes
Before redeeming, you can audit what you're carrying:
/withdraw check <currency>— total value, note count, average per note, and inventory slots used./withdraw view <currency>— a richer breakdown showing each denomination and how many of each you hold.
Both commands only count notes whose serial and signature are valid — corrupted or tampered notes are silently excluded from the totals so the figures you see are redeemable.
Lifespan and Storage
Banknotes are plain items, so they follow normal item rules: they can be stored in chests, ender chests, the player vault, cells, the auction house, or traded face-to-face. The configured banknote_lifespan_days (default 365) caps how long a serial stays valid in the database; a hard cap of max_banknotes_per_inventory (default 2304, i.e. 64 stacks) prevents runaway minting from swamping the table.
The signature_salt is generated once (random UUID + long) when the server first starts and stored in withdraw.yml. Rotating it invalidates every existing note, so treat it as a permanent secret.
Permissions
imperiummc.withdraw.create— required to mint banknotes (default: true).imperiummc.withdraw.redeem— required to redeem banknotes (default: true).
Both are on by default for players. Servers that want to restrict minting (e.g. to a donor perk) can flip imperiummc.withdraw.create off without affecting redemption.
Command Reference
| Command | What it does |
|---|---|
/withdraw withdraw <amount> <currency> | Mint a single banknote (aliases: w, create, make). Suffixes k/m/b allowed. |
/withdraw withdrawall <currency> | Withdraw your entire balance of that currency as one note (aliases: wa, all, max). |
/withdraw redeem <currency> | Redeem ALL banknotes of that currency in your inventory at once (aliases: r, cash, claim). |
/withdraw redeemall <currency> | Same as redeem — bulk-redeem every matching note (aliases: ra, cashall). |
/withdraw hand | Redeem the single banknote held in your main hand (aliases: h, mainhand, mh). |
/withdraw check <currency> | Show total value and count of a currency's banknotes in your inventory (aliases: c, value, count). |
/withdraw view <currency> | Detailed breakdown of denominations you hold (aliases: v, list, inventory). |
/withdraw help | In-game command reference (aliases: ?, commands, guide). |
/withdraw info | Banknote feature summary (alias: about). |
Tab-completion offers common amounts (1000, 10k, 100k, …) and the four currency names. Aliases are extensive: w, wa, r, h, c, v for the most-used subcommands.
Tips
- Use banknotes for big trades. Handing over a 100M Denarius note is faster and safer than
/payin chunks. - Right-click to redeem. It's the fastest path — no command needed.
- Check before you redeem.
/withdraw check denariusconfirms the total you're about to fold in. - Store value in the vault. A banknote in your vault survives a death — keep a reserve there.
- Don't stack notes. A stack of > 1 is refused at redeem (anti-dupe). Keep them as single items.
- Bulk redeem by currency.
/withdraw redeem denariussweeps every Denarius note in one shot.
Banknotes turn Imperium's digital currencies into physical, giftable, tradeable items — without ever exposing the economy to duplication. They are the foundation of trust for every high-value player transaction.