Skip to content

System Architecture and Lifecycle

AshleyThew edited this page Jul 5, 2026 · 1 revision

System Architecture and Lifecycle

Overview

This page explains how Bank systems start, run, and stop. It is written for admins planning safe reloads, restarts, and migrations.

How It Works

BankPlugin is the Bukkit entry point and delegates lifecycle control to BankCoreHandler.

Runtime flow:

  1. onLoad: update check, upgrade check, first-install check, config/database/command/inventory load.
  2. onEnable: listener registration, optional save-type conversion or upgrade conversion, first-install integration checks, implementation enable, autosave enable, loader thread start.
  3. onDisable: implementation disable, autosave disable, converter disable, player manager disable, loader thread stop.

Lifecycle subsystems

  • Config subsystem: loads YAML and command/permission/inventory definitions.
  • Storage subsystem: selects backend and prepares lock/history tables.
  • Integration subsystem: enables optional hooks (placeholder, citizens, etc).
  • Player loader subsystem: loads and unlocks account data for online players.
  • Autosave subsystem: periodic persistence of loaded account state.

Configuration

Key lifecycle-sensitive keys in config.yml:

  • Bank.Save.Type
  • Bank.Save.Lock.Time
  • Bank.Save.Auto.Enabled
  • Bank.Save.Auto.Timer
  • Bank.Convert.Confirm (in convert.yml)
  • Upgrade.* (in upgrade.yml)

Operational guidance:

  • Use restart for conversion, upgrade, and backend switches.
  • Use /bank admin reload for routine config refresh when no migration flags are active.

Commands

  • /bank admin reload reloads plugin systems through disable/load/enable ordering.
  • /bank admin save forces save operations.

Permissions

  • bank.admin.reload
  • bank.admin.save

Data and Storage

Lifecycle controls when player info is loaded, locked, and released against the active storage backend.

Examples

  • Safe reload: ensure no conversion is pending, run /bank admin save, then /bank admin reload.

Safe restart for backend change:

  1. Run /bank admin save.
  2. Confirm conversion and upgrade flags are intentional.
  3. Restart server.
  4. Verify backend and player load logs.

Troubleshooting

  • If plugin loads but does not enable, check Core dependency and upgrade/convert flags.
  • If players are kicked on login with conversion messaging, finish conversion and restart.

Related Pages

Clone this wiki locally