Events Hooks and Extensibility - AshleyThew/Bank GitHub Wiki
Integrations and Access Modes
Overview
This page is the single admin guide for external integrations and open access modes. It replaces separate integration pages so setup is done in one place.
How It Works
Bank integration behavior is split into subsystems:
- Placeholder subsystem: PlaceholderAPI and MVdW values for HUD/scoreboards.
- Citizens subsystem: NPC entry points with bank trait support.
- Block subsystem: admin-registered blocks as bank entry points.
- Sign subsystem: configured sign text opens bank flow.
- Access permission subsystem: behavior checks in
conf/permissions.yml.
Bank also emits a player-loaded event for developers, but server admins usually only need the runtime toggles and permissions listed below.
Configuration
Primary keys in config.yml:
Bank.Implementation.Placeholder.*Bank.Type.Citizens.EnabledBank.Type.Block.*Bank.Type.Sign.*Bank.Opentype.Subset.*
Reference files:
Placeholder baseline:
Bank:
Implementation:
Placeholder:
Api: true
Mvdw: false
Prefix: bank
Citizens and sign/block baseline:
Bank:
Type:
Citizens:
Enabled: true
Block:
Enabled: true
Sign:
Enabled: true
Text: "[Bank]"
Commands
Integration admin commands:
/bank admin npc setopentypes [types...]/bank admin block add|remove
Permissions
Common integration and access permissions:
bank.open.signbank.open.citizensbank.open.blockbank.sign.placebank.admin.npc.setopentypesbank.admin.block.addbank.admin.block.remove
Permission-check baseline:
Permission:
Open:
Sign:
Check: true
Permission: bank.open.sign
Citizens:
Check: true
Permission: bank.open.citizens
Block:
Check: true
Permission: bank.open.block
Data and Storage
Integration toggles and block/sign configuration are file-based settings. Per-player account balances and transaction data remain in normal Bank persistence.
Examples
Placeholder rollout:
- Install PlaceholderAPI.
- Set
Bank.Implementation.Placeholder.Api: true. - Reload or restart Bank.
- Test a known value in your scoreboard/chat plugin.
Citizens NPC rollout:
- Install Citizens.
- Set
Bank.Type.Citizens.Enabled: true. - Create NPC and run
/trait add bank-trait. - Grant
bank.open.citizens.
Block bank rollout:
- Set
Bank.Type.Block.Enabled: true. - Run
/bank admin block addwhile targeting the block. - Grant
bank.open.block.
Sign bank rollout:
- Set
Bank.Type.Sign.Enabled: trueand confirm sign text. - Grant
bank.open.sign. - If sign placement checks are used, also grant
bank.sign.place.
Troubleshooting
- Placeholder values not resolving: check implementation flags and installed placeholder plugin.
- Citizens bank trait not working: verify Citizens plugin and type enable flag.
- Block open fails: confirm block was registered and permission check toggle is correct.
- Sign open fails: confirm sign text matches configured marker and permission checks are aligned.