Skip to content

GUI Customization

joogiebear edited this page Jul 14, 2026 · 3 revisions

GUI Customization

Every menu is a file in plugins/RoyalBank/gui/. Run /bank reload after editing.

File Menu
main.yml The main bank screen (/bank)
deposit.yml Deposit amount picker
withdraw.yml Withdraw amount picker
transactions.yml Recent transactions view
confirm-upgrade.yml Upgrade confirmation

File structure

title: "&6&lBank"
rows: 4

sounds:
  open:
    enabled: true
    name: "UI_BUTTON_CLICK"
    volume: 0.7
    pitch: 1.2
  success: { enabled: true, name: "ENTITY_EXPERIENCE_ORB_PICKUP", volume: 0.8, pitch: 1.4 }
  fail:    { enabled: true, name: "ENTITY_VILLAGER_NO", volume: 0.7, pitch: 1.0 }
  prompt:  { enabled: true, name: "BLOCK_NOTE_BLOCK_PLING", volume: 0.7, pitch: 1.5 }

filler:
  enabled: true
  material: "GRAY_STAINED_GLASS_PANE"
  name: "&8"
  lore: []

items:
  deposit:
    slot: 12               # 0-based slot index
    material: "CHEST"
    name: "&aDeposit Coins"
    lore:
      - "&7Deposit coins into your bank."
      - ""
      - "&7Purse: &6{purse}"
      - "&7Bank: &6{balance}&7/&6{max_balance}"
      - ""
      - "&eClick to deposit coins!"
    action: "OPEN_DEPOSIT"

Top-level keys

Key Meaning
title Inventory title (& color codes).
rows Menu height, 1–6.
sounds Sounds for open / success / fail / prompt events. Each has enabled, name (a Bukkit Sound), volume, pitch.
filler Background filler pane for empty slots.
items The buttons — a map of named entries.

Item keys

Key Meaning
slot 0-based slot index. In a 9-wide inventory, slot 12 is row 2, column 4.
material A Bukkit Material, or an item reference your setup supports.
name Display name.
lore Lore lines.
action What the button does when clicked (see below).

Actions

The action value wires a button to a behavior. These are the recognized actions:

Action Effect
OPEN_DEPOSIT Open the deposit menu
OPEN_WITHDRAW Open the withdraw menu
DEPOSIT_ALL Deposit the whole purse
DEPOSIT_HALF Deposit half the purse
DEPOSIT_CUSTOM Prompt in chat for a custom deposit amount
WITHDRAW_ALL Withdraw the whole bank balance
WITHDRAW_HALF Withdraw half the balance
WITHDRAW_TWENTY Withdraw 20% of the balance
WITHDRAW_CUSTOM Prompt in chat for a custom withdraw amount
RECENT_TRANSACTIONS Open the recent-transactions view
UPGRADE Open the tier upgrade flow
CONFIRM_UPGRADE Confirm the pending upgrade
BACK_MAIN Return to the main bank menu
CLOSE Close the menu
NONE Decorative — does nothing on click

A button with NONE (or an unrecognized/missing action) is treated as decorative — useful for info panels. If a button does nothing you expect it to, check its action: value and the console for config warnings.

The chat-prompt actions (DEPOSIT_CUSTOM, WITHDRAW_CUSTOM) listen for a chat message for settings.custom-amount-timeout-seconds before they stop capturing input.

Placeholders inside GUIs

Menu text supports {token} placeholders that fill in live values:

Token Value
{purse} Player's purse (Vault) balance
{balance} Bank balance
{max_balance} Max balance for their tier
{bank_space} Remaining room in the bank (max_balance − balance)
{account_name} Tier display name
{half_purse} Half the purse (for the deposit-half button)
{half_balance} Half the bank balance
{twenty_balance} 20% of the bank balance
{next_interest} Amount of the next interest claim
{max_interest} Interest cap for their tier
{interest_time} Time until interest can next be claimed
{upgrade_info} Summary of the next tier and its cost

These {curly} tokens are RoyalBank's own GUI tokens and are separate from PlaceholderAPI %percent% placeholders — see PlaceholderAPI for those, which work in other plugins (scoreboards, chat, holograms).

Permission-aware buttons

Buttons enforce the same permissions as their command. A player without royalbank.deposit sees the Deposit button but can't use it — restrict via permissions, not by editing the menu, so the layout stays consistent across ranks.

Clone this wiki locally