Simple Banking

A Vault Enabled Scoreboard Driven Banking Plugin

112

Quick challenge

How far can you run before the mobs catch you?

Simple Banking

Simple Banking

Simple Banking is a Vault-enabled, scoreboard-driven bank plugin for Spigot servers. Players deposit a configurable currency item (and optionally its block form) into shared "Bank Chests" but maintain per-player balances. Withdrawals convert bank balance back into items and blocks based on a configurable multiplier.

Features

- Per-player balances stored in `config.yml` - Configurable currency: item and optional block with multiplier (e.g., 1 `DIAMOND_BLOCK` = 9 `DIAMOND`) - Deposits via: - Shift-click into Bank Chests - Cursor click onto Bank Chest slots - Hopper transfer with per-hopper owner tracking - Withdrawals split into blocks first (to save inventory slots), then leftover items - Live scoreboard updates in tab list and below player names - Vault `Economy` provider for compatibility with other plugins - In-game currency management command with autocompletion for `minecraft:[item]`

Requirements

- Server: Bukkit/Spigot/Paper 1.21.x - Java: 17+ - Plugins: `Vault`

Installation

1. Ensure `Vault` is installed. 2. Copy `simplebanking-<version>.jar` into your server `plugins/` directory. 3. Start the server. The plugin creates default `config.yml`. 4. Verify startup logs show: - Registered SimpleBanking as Vault provider - Simple Banking enabled / account count

Configuration (`src/main/resources/config.yml`)

``` players: {} bank-chests: [] currency: item: DIAMOND block: DIAMOND_BLOCK block_multiplier: 9 name_singular: Diamond name_plural: Diamonds ``` - `currency.item`: Base item material ID - `currency.block`: Optional block material ID; omit to disable block deposits/withdrawals - `currency.block_multiplier`: Units per block - `name_singular` / `name_plural`: Display names used in scoreboard and messages

Changes are persisted automatically when using `/currency`; manual edits require a server restart or configuration reload.

Commands

- `/givebankchest` - Gives a tagged chest that becomes a Bank Chest when placed - Permission: `diamondbank.admin` - `/withdraw <amount>` - Withdraws `<amount>` units from the player’s bank - Converts to blocks first, then items using the configured multiplier - Permission: `diamondbank.withdraw` - `/balance` - Shows leaderboard of players with non-zero balances - Permission: `diamondbank.balance` - `/currency <item> [block] [multiplier] [singular] [plural]` - Changes the currency item and optional block/multiplier and display names - Autocompletes as `minecraft:[item]` for first arg and `minecraft:[block]` for second - Requires all player balances to be zero before change - Permission: `diamondbank.admin`

Permissions

- `diamondbank.admin`: Admin tasks like giving Bank Chests and changing currency (default `op`) - `diamondbank.withdraw`: Allows withdrawals (default `true`) - `diamondbank.balance`: Allows viewing the leaderboard (default `true`)

How Deposits Work

- Bank Chest placement: placing the given chest item registers the location as a Bank Chest - Manual deposits: - Shift-click: moving currency items/blocks from inventory into a Bank Chest credits units - Cursor click: placing currency items/blocks into Bank Chest slots credits units - Hopper deposits: - Hoppers track owner via persistent data when placed - Moving currency items/blocks into a Bank Chest credits that owner’s balance - If owner is unknown, credits the nearest player within 16 blocks

Scoreboard

- Displays currency plural name (e.g., "Diamonds") in tab list and below player names - Updates on every deposit/withdrawal and player join

Vault Economy

- Implements Vault `Economy` for compatibility; account balance maps to bank units - No bank accounts (only player accounts). Vault bank-related methods return NOT_IMPLEMENTED

Troubleshooting

- Invalid `plugin.yml`: - Ensure no non-ASCII/control characters; fix and rebuild - Scoreboard class errors: - Must import `org.bukkit.scoreboard.Scoreboard` and `ScoreboardManager` - Always restart server after updating the plugin to avoid stale classes - Duplicate JARs: - Remove old copies (e.g., both `SimpleBanking.jar` and `simplebanking-<version>.jar`) to prevent classpath conflicts - Currency change blocked: - `/currency` refuses changes if any player balance > 0; have players withdraw first and retry

ADS