Skip to content

GUI and Inventory Interactions

AshleyThew edited this page Jul 5, 2026 · 1 revision

GUI and Inventory Interactions

Overview

Bank uses inventory-based interfaces for all player banking actions. Admins control this through multiple GUI-related subsystems.

How It Works

BankInventories maps each UI to an inventory handler and descriptor from conf/inventories.yml. BankInventoriesManager enforces world/gamemode restrictions, lock state, permissions, and optional open-type subset gating.

Open-type enum values:

  • ALL, MENU, ITEMS, MONEY, EXP, LOANS, CHEQUES

Important current behavior:

  • getBankInventories(OpenTypes...) explicitly routes MENU, ITEMS, MONEY, and EXP.
  • LOANS and CHEQUES are valid enum values but are not directly routed by that method and currently fall back to main menu selection.

GUI subsystems

  • Menu layout subsystem: conf/inventories.yml
  • GUI item template subsystem: conf/items.yml and conf/default_items.yml
  • Access route subsystem: Bank.Type.*
  • Open target restriction subsystem: Bank.Opentype.Subset.*
  • Security gate subsystem: Bank.Pin.*

Configuration

Key GUI config areas:

  • conf/inventories.yml
  • conf/items.yml
  • Bank.Opentype.Subset.* in config.yml
  • Bank.Pin.Enabled

Reference files:

PIN and open-route baseline:

Bank:
	Pin:
		Enabled: true
	Opentype:
		Subset:
			Enabled: true
			Command:
				Enabled: true
			Citizens:
				Enabled: true
			Sign:
				Enabled: true

Subsystem notes:

  • If you change inventory button actions, verify command and permission mappings still match.
  • If subset restrictions are enabled, test each open route after edits.
  • If PIN is enabled, first-open flow changes for players without validated PIN state.

Commands

GUI entry commands:

  • /bank
  • /bank open
  • /bank money open
  • /bank exp open
  • /bank admin open <player>

Permissions

GUI access checks use both command permissions and inventory descriptor permissions from config.

Data and Storage

GUI state is mostly runtime; persistent data is stored in account info models.

Examples

  • PIN enabled and not passed: open request is redirected to PIN entry inventory.
  • Money-only mode enabled: /bank opens money inventory directly instead of main menu.

Open subset policy profile:

  1. Enable Bank.Opentype.Subset.Enabled.
  2. Enable the channels you want: Command, Citizens, and/or Sign.
  3. Use command permissions to limit which open commands players can run.
  4. Validate with both player and admin accounts.

Troubleshooting

  • GUI opens wrong section: verify Only mode toggles and open-type subset settings.
  • Admin open denied: verify admin inventory permission and extra admin permission settings.
  • Loans or cheques open target not direct-routing: expected behavior in current selector; users can still reach through main menu.

Related Pages

Clone this wiki locally