Skip to content

Account and Balance Model

AshleyThew edited this page Jul 5, 2026 · 1 revision

Account and Balance Model

Overview

Each player has one bank account container with several feature subsystems. This page describes what each account subsystem stores and how admins configure behavior around it.

How It Works

Core account parts:

  • Money: BankMoneyInfo
  • Exp: BankExpInfo
  • Items: BankItemsInfo
  • PIN: BankPinInfo
  • Loans: BankLoansInfo
  • Permission cache: BankPermissionInfo
  • Transaction history: money/exp transaction info classes

Load path creates info objects, loads persisted JSON by type, initializes runtime-only fields, then unlocks account.

Account subsystems

  • Money balance subsystem
  • Exp balance subsystem
  • Item storage subsystem
  • PIN protection subsystem
  • Loans subsystem
  • Permission-cache subsystem
  • Transaction history subsystem

Configuration

Model behavior is controlled by config.yml, especially:

  • Bank.Money.*
  • Bank.Exp.*
  • Bank.Items.*
  • Bank.Pin.Enabled
  • Bank.Loans.*

Admin tuning guidance:

  • Use money/exp keys for economy behavior.
  • Use item keys for capacity and tab behavior.
  • Use loan keys for limits and repayment behavior.
  • Use PIN keys only if your server needs account-level access confirmation.

Commands

Model-related commands include money/exp deposit/withdraw/send, open commands, and admin account mutation commands.

Permissions

Permission-value prefixes influence model limits and rates:

  • bank.item.slots.
  • bank.tabs.
  • bank.loan.amount.
  • bank.loan.interest.
  • bank.money.interest.online. and related exp/offline variants

Data and Storage

Persistent account segments are stored as JSON payloads keyed by player UUID and info-type mapping. Transient runtime fields (for example temporary cheque state and scroll positions) are not persisted.

Practical impact:

  • If runtime GUI state looks wrong after relog, check config and permissions, not persisted account JSON.
  • If balances or loans are wrong after restart, inspect backend payload records and logs.

Examples

  • Player joins, account locks, loader hydrates all info types, and account unlocks.
  • Offline interest is accumulated into offline fields and applied on next online load.

Troubleshooting

  • If balances look stale after join, confirm lock release and loader completion.
  • If permissions do not apply, trigger permission refresh by relogging or using admin permission update flow.

Related Pages

Clone this wiki locally