Skip to main content

Bank Configuration

The bank configuration is stored in config.json inside the plugin's data folder. On first launch, if no config file exists, the default is extracted from the plugin JAR.


Config Fields

defaultPages

TypeDefaultMin
Integer11

Number of bank pages each player starts with. New players automatically receive this many pages when their bank is first created.

maxPages

TypeDefaultMin
Integer5Must be >= defaultPages

Maximum number of bank pages a player can unlock. Once a player reaches this limit, further upgrades are denied.

slotsPerPage

TypeDefaultMin
Integer451

Number of item slots per bank page. This determines the capacity of each SimpleItemContainer created for the bank pages.

pageCosts

TypeDefault
Integer Array[0, 250, 500, 1000, 2500]

Cost in currency to unlock each page. The array is 0-indexed:

  • Index 0 = cost for page 1 (typically 0 since defaultPages gives the first page free)
  • Index 1 = cost for page 2
  • Index 2 = cost for page 3
  • etc.

If a page number exceeds the array length, the cost defaults to 0.

Example — escalating costs:

{
"pageCosts": [0, 250, 500, 1000, 2500]
}

currency

TypeDefault
String"gold"

The currency used for page upgrades. This references the economy system provided by KyuubiSoft Core.

restrictionMode

TypeDefaultOptions
String"blacklist""blacklist", "whitelist"

Controls how the restrictedItems list is interpreted:

  • blacklist — Items matching the list are blocked from being stored in the bank. Everything else is allowed.
  • whitelist — Only items matching the list are allowed. Everything else is blocked.

Restrictions are enforced server-side via DelegateItemContainer slot validation.

restrictedItems

TypeDefault
String Array[] (empty)

List of item ID patterns for the restriction system. Supports wildcard matching:

  • Exact match: "Quest_Item_Key" — blocks/allows only this specific item
  • Wildcard: "Quest_Item_*" — matches all items starting with Quest_Item_

Example — blacklist quest items and soulbound gear:

{
"restrictionMode": "blacklist",
"restrictedItems": [
"Quest_Item_*",
"Soulbound_*"
]
}

Example — whitelist only crafting materials:

{
"restrictionMode": "whitelist",
"restrictedItems": [
"Ingot_*",
"Ore_*",
"Wood_*",
"Gem_*"
]
}

historyMaxEntries

TypeDefaultMin
Integer1000

Maximum number of transaction log entries stored per player in the SQLite database. Older entries are pruned when this limit is exceeded.

Set to 0 to disable history tracking.


Full Example

{
"defaultPages": 1,
"maxPages": 5,
"slotsPerPage": 45,
"pageCosts": [0, 250, 500, 1000, 2500],
"currency": "gold",
"restrictionMode": "blacklist",
"restrictedItems": [
"Quest_Item_*",
"Soulbound_*",
"Admin_Tool_*"
],
"historyMaxEntries": 100
}

Validation

The config is validated on load. Invalid values are corrected automatically:

FieldCorrection
defaultPages < 1Set to 1
maxPages < 1Set to 5
maxPages < defaultPagesSet to defaultPages
slotsPerPage < 1Set to 45
pageCosts is nullSet to [0, 250, 500, 1000, 2500]
currency is null or emptySet to "gold"
restrictionMode is nullSet to "blacklist"
restrictedItems is nullSet to []
historyMaxEntries < 0Set to 100

Hot Reload

The configuration can be reloaded at runtime without a server restart using:

/ksbank reload

This reloads config.json, revalidates all fields, and recompiles the restriction patterns. Requires the bank.admin permission.