Code:# MBank Plugin — Documentation **Version:** 3.1 | **Author:** Chkaduuu | **API:** Paper 1.21+ --- ## Player Commands | Command | Description | |---|---| | `/bank` | Open the bank GUI menu | | `/bank create` | Create a bank account | | `/bank deposit <amount>` | Deposit money from wallet into bank | | `/bank withdraw <amount>` | Withdraw money from bank to wallet | | `/bank cashout <amount>` | Withdraw as a physical paper banknote | | `/bank transfer <player> <amount>` | Transfer money to another player | | `/bank loan` | Open loan menu (left-click = take, right-click = repay) | | `/bank info` | View your account info | | `/bank history` | View last 10 transactions | | `/bank top` | View top 10 richest players | | `/bank pin create <PIN>` | Create your 4-digit ATM PIN | | `/bank pin edit <old> <new>` | Change your ATM PIN | | `/bank help` | Show help message | --- ## Admin Commands | Command | Description | |---|---| | `/bank level give <player>` | Raise player loan level by 1 | | `/bank level take <player>` | Lower player loan level by 1 | | `/bank setlevel <player> <level>` | Set player loan level directly | | `/bank reset <player>` | Reset a specific player's account | | `/bank reset all` | Reset all player accounts | | `/bank atm set` | Place ATM on the block you are looking at | | `/bank atm remove` | Remove ATM from the block you are looking at | | `/bank pin info <player>` | View a player's PIN | | `/bank unpin <player>` | Unlock a player's locked PIN | | `/bank stats` | View server-wide bank statistics | | `/bank reload` | Reload plugin config and language files | --- ## Permissions | Permission | Description | Default | |---|---|---| | `mcbank.use` | Access to all basic player commands | **true** (everyone) | | `mcbank.admin` | Access to all admin commands | **op** | | `mcbank.atm.set` | Permission to place and remove ATMs | **op** | | `mcbank.*` | All permissions (use + admin + atm.set) | **op** | --- ## PlaceholderAPI Placeholders Requires **PlaceholderAPI** plugin installed. | Placeholder | Description | Example output | |---|---|---| | `%mcbank_bank_balance%` | Player's current bank balance | `15,000.00` | | `%mcbank_bank_loan%` | Player's current active loan amount | `5,000.00` | | `%mcbank_bank_number%` | Player's bank account number | `ACC-00042` | | `%mcbank_bank_level%` | Player's bank upgrade level | `3` | | `%mcbank_bank_limit%` | Player's current bank balance limit | `50,000.00` | | `%mcbank_bank_loan_limit%` | Player's maximum loan limit | `30,000.00` | | `%mcbank_loan_percent%` | Current loan interest rate | `5` | --- ## Soft Dependencies These plugins are optional but unlock additional features: | Plugin | Purpose | |---|---| | **Vault** | Connects bank deposit/withdraw to server economy | | **PlaceholderAPI** | Enables all `%mcbank_...%` placeholders | | **EssentialsX** | Economy integration fallback | | **CMI** | Economy integration fallback | --- ## Loan System Loans are level-based. Each player has a **loan level** (0 by default) set by an admin. The loan level determines the maximum loan amount a player can take. - Level 0 → No loans allowed - Level 1 → Up to $10,000 - Level 2 → Up to $20,000 - ...up to Level 50 → Up to $1,000,000,000 **To give a player loan access:** ``` /bank level give <player> ``` Interest is added on top of the loan amount automatically. Interest rate is configured in `config.yml`. Loans are repaid from the bank balance. Right-click the **Loan** button in the GUI to repay. --- ## ATM System ATMs allow players to withdraw money in the world without opening the bank GUI. - ATMs have a **daily withdrawal limit** (configured in `config.yml`) - Each player needs a **4-digit PIN** to use an ATM (`/bank pin create <PIN>`) - After **3 wrong PIN attempts**, the PIN is locked — an admin must unlock it with `/bank unpin <player>` - Admins place ATMs by looking at a block and running `/bank atm set` --- ## Bank Upgrade System Players can upgrade their bank level using money from their bank balance. Higher levels increase the **maximum balance limit** and **passive income rate**. Upgrade prices and limits are configured in `upgrade.yml`. --- ## Banknote System `/bank cashout <amount>` gives the player a physical **paper banknote** item. - The banknote holds the exact amount and the owner's name - Right-clicking the paper deposits it back into the bank - Banknotes can be traded between players --- ## Config Files | File | Purpose | |---|---| | `config.yml` | Main settings (min amounts, interest rate, ATM limits, income interval) | | `data.yml` | Player account data (auto-managed) | | `level.yml` | Loan limits per level (1–50) | | `upgrade.yml` | Bank upgrade prices and balance limits per level | | `gui_main.yml` | Main bank GUI layout and item configuration | | `gui_atm.yml` | ATM GUI layout and item configuration | | `languages/en.yml` | English messages | | `languages/ru.yml` | Russian messages |
