Configuration
Database
XCore supports SQLite (default, zero config), MySQL, and PostgreSQL.
database-type: sqlite # sqlite, mysql, postgresql
database:
host: localhost
port: 3306
name: xcore
username: root
password: ""
pool-size: 10
Use MySQL or PostgreSQL for multi-server setups. SQLite is single-server only and doesn't support cross-server sync.
Cross-Server
The cross-server block controls Redis (L2 cache + instant Pub/Sub sync) and database polling (fallback sync). Both are configured together.
cross-server:
enabled: false
server-name: "default"
redis:
enabled: false
host: localhost
port: 6379
password: ""
database: 0
ttl: 3600
sync:
poll-interval-seconds: 3 # Database polling interval (if no Redis)
retention-seconds: 300 # How long to keep DB sync rows
Redis is the preferred transport (instant delivery). Database polling is the fallback with a configurable delay.
server-name identifies this server instance. It is used by addons (e.g. per-server economy balances) and sync channels. Each addon registers named channels. XCore multiplexes them over a single Redis channel (xcore:sync) or database table (xcore_sync).
Addon toggles and sync-addon toggles are configured in a separate addons.yml file, not in config.yml.
Economy
XCore includes a full economy system with multi-currency support, Vault integration, and currency exchange.
economy:
enabled: true
per-server-balances: false # Uses cross-server.server-name
currencies:
coins:
symbol: "$"
symbol-position: BEFORE # BEFORE or AFTER
decimals: 2
starting-balance: 0.00
max-balance: 1000000000
vault: true # Primary Vault currency
gems:
symbol: "✦"
symbol-position: AFTER
decimals: 0
starting-balance: 0
max-balance: 0 # 0 = unlimited
vault: false
exchange:
enabled: true
rates:
coins-to-gems: 100 # 100 coins = 1 gem
gems-to-coins: 80 # 1 gem = 80 coins
The currency marked with vault: true becomes the primary Vault provider. All other plugins (shops, auction house, etc.) see this currency through Vault.
Set per-server-balances: true to maintain separate balances per server. The server identity comes from cross-server.server-name in the main config.
Web Dashboard
web-dashboard:
enabled: false
port: 8085
token: "CHANGE_ME_TO_A_SECURE_TOKEN"
metrics-public: true
The web dashboard serves a vanilla JS single-page application. Each addon can register a web module with custom pages and API endpoints.
Change the default token immediately. It's used for Authorization: Bearer <token> on all API endpoints.