-
Notifications
You must be signed in to change notification settings - Fork 0
Configuration
This page explains the main configuration options for Coffers and Coffers Legacy.
Both plugin lines use a config.yml file, and both support the same major configuration areas:
- Vault compatibility
- Storage backend selection
- Transaction history limits
- Currency definitions
- Currency formatting rules
The default configuration templates are included with each plugin line:
- Modern line defaults:
coffers-paper/src/main/resources/config.yml - Legacy line defaults:
coffers-legacy/src/main/resources/config.yml
After first startup, the plugin will generate its configuration files inside its plugin data folder on the server.
The main sections are:
compatibilitystoragehistorycurrencies
The Vault bridge setting is controlled here:
compatibility:
vault-bridge: autoAvailable modes:
-
autoRegister with Vault only when Vault is installed -
enabledForce Coffers to expose a Vault economy provider when Vault is present -
disabledNever register the Vault bridge
Recommended usage:
- use
autofor most servers - use
enabledonly if you specifically want Coffers to register whenever Vault is available - use
disabledif you do not want Vault integration at all
The active storage backend is selected here:
storage:
type: yamlSupported values:
yamlsqlitemysql
YAML is the simplest option and is enabled by default.
Modern line example:
storage:
type: yaml
yaml:
accounts-file: accounts.yml
history-file: history.ymlLegacy line example:
storage:
type: yaml
yaml:
accounts-file: legacy-accounts.yml
history-file: legacy-history.ymlUse YAML when:
- your server is small
- you want the simplest possible setup
- you do not need a SQL database
SQLite stores data in a local database file on the server.
Modern line example:
storage:
type: sqlite
sqlite:
file: coffers.dbLegacy line example:
storage:
type: sqlite
sqlite:
file: coffers-legacy.dbUse SQLite when:
- you want structured persistence
- your economy lives on one server
- you do not want to manage MySQL
MySQL is intended for larger setups or environments that need a shared database.
Modern line example:
storage:
type: mysql
mysql:
host: localhost
port: 3306
database: coffers
username: root
password: change-me
parameters: useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=UTCLegacy line example:
storage:
type: mysql
mysql:
host: localhost
port: 3306
database: coffers_legacy
username: root
password: change-me
parameters: useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=UTCUse MySQL when:
- you run a larger server environment
- you want central database storage
- you are comfortable managing SQL credentials and database access
Transaction history size is controlled here:
history:
max-per-account: 50This value controls how many recent ledger entries are kept per account in storage.
You may want:
- a lower value for smaller or lighter setups
- a higher value if you want more account audit history
Currencies are defined in the currencies section.
Example:
currencies:
default: coins
definitions:
coins:
singular: coin
plural: coins
symbol: $
fractional-digits: 2
starting-balance: 100.00
format:
symbol-first: true
space-between-symbol-and-amount: false
space-between-amount-and-name: true
use-grouping: true
show-trailing-zeros: trueEach currency can define:
- singular name
- plural name
- symbol
- fractional digits
- starting balance
- display formatting rules
The default currency is set here:
currencies:
default: coinsImportant:
- the default currency must exist in
currencies.definitions - Coffers now validates this at startup
- if the configured default currency is missing, startup will fail instead of silently using a broken configuration
Each currency can also define its own display rules.
Example:
format:
symbol-first: true
space-between-symbol-and-amount: false
space-between-amount-and-name: true
use-grouping: true
show-trailing-zeros: trueThese rules control how formatted balance output appears in commands and plugin displays.
The default config includes coins and gems.
Example:
currencies:
default: coins
definitions:
coins:
singular: coin
plural: coins
symbol: $
fractional-digits: 2
starting-balance: 100.00
format:
symbol-first: true
space-between-symbol-and-amount: false
space-between-amount-and-name: true
use-grouping: true
show-trailing-zeros: true
gems:
singular: gem
plural: gems
symbol: ◆
fractional-digits: 0
starting-balance: 0
format:
symbol-first: false
space-between-symbol-and-amount: true
space-between-amount-and-name: true
use-grouping: true
show-trailing-zeros: falseNote:
- the legacy config currently uses
*as the samplegemssymbol - the modern config currently uses
◆
- storage type:
yaml - history limit:
25to50 - Vault mode:
auto
- storage type:
sqlite - history limit:
50or higher - Vault mode:
auto
- storage type:
mysql - history limit: based on your storage and audit needs
- Vault mode:
autoorenabled, depending on your plugin environment
Avoid these common issues:
- setting a default currency that is not defined
- enabling MySQL without valid credentials
- choosing the wrong storage type for your server setup
- forgetting to restart after changing important settings
- assuming the modern and legacy lines use identical file names for storage outputs