config.yml¶
Server-wide settings: the language, the game mode and the storage. Every gameplay setting lives in the module files instead.
Every example on this page is taken from the shipped config.yml, the file the plugin writes on its first start.
Read at startup only
kitmap-mode and the whole storage section need a restart. language and combat apply with /hcf reload.
Language¶
config.yml
# Language of the messages: lang/<language>.yml in this folder. The plugin ships
# English (en); to translate, copy lang/en.yml to lang/<code>.yml, translate it and
# set its code here.
language: en
| Key | As shipped | What it does |
|---|---|---|
language |
en |
Which lang/<language>.yml the messages come from. See Messages and translation |
Game mode¶
config.yml
# Determines which game mode this server instance runs.
# - false (default): full HCF mode, all systems enabled (Lives system, DTR, claims...).
# - true: Kitmap mode. Modules that don't apply to Kitmap - today, the Lives
# system - do not initialize at all, not just hide their commands. Everything
# else is shaped by the module files (a kitmap usually turns deathbans off in
# pvp.yml, for instance).
# Read at startup only: changing it needs a restart, not /hcf reload.
kitmap-mode: false
| Key | As shipped | What it does |
|---|---|---|
kitmap-mode |
false |
false is HCF, true is Kitmap — the lives module does not start. See Game modes |
Storage¶
config.yml
# This whole section is read at startup only: changing it needs a restart, not
# /hcf reload. Switching type starts from an empty database - nothing copies the
# data from one to the other.
storage:
# "sqlite" for solo/dev, "mysql" for production.
type: sqlite
# How often the in-memory caches are flushed to the database, in seconds
# (memory is the source of truth; the database is written periodically, in the
# background). A full save also runs on a clean shutdown.
# 0 disables the periodic save, leaving only the shutdown one - not recommended,
# since a crash would then lose everything since startup.
save-interval-seconds: 300
mysql:
host: localhost
port: 3306
database: hcfcore
username: root
# Better left empty: set the environment variable HCFCORE_MYSQL_PASSWORD for
# the server process instead, and a real password never sits in a file. Set
# and not blank, the variable wins over this value; the console says which of
# the two was used (never the password itself).
password: ""
# MySQL Connector/J connection properties, handed to the driver as they are
# (dev.mysql.com/doc/connector-j, "Configuration Properties").
# sslMode PREFERRED - the driver's own default - encrypts whenever the server
# offers TLS, which MySQL 8 does out of the box. It is also what lets MySQL 8's
# default login (caching_sha2_password) work: over an unencrypted connection
# the driver will not fetch the server's key and every connection fails with
# "Public Key Retrieval is not allowed". REQUIRED or VERIFY_IDENTITY insist on
# encryption; a server without TLS needs sslMode: DISABLED and
# allowPublicKeyRetrieval: true.
properties:
sslMode: PREFERRED
| Key | As shipped | What it does |
|---|---|---|
storage.type |
sqlite |
sqlite (a file, for development and solo servers) or mysql (production) |
storage.save-interval-seconds |
300 |
How often changes are written to the database. A full save also runs on a clean shutdown. 0 leaves only that one |
storage.mysql.host, port, database, username |
localhost, 3306, hcfcore, root |
Where MySQL is, and who connects |
storage.mysql.password |
empty | Better left empty: the HCFCORE_MYSQL_PASSWORD environment variable wins over it |
storage.mysql.properties |
sslMode: PREFERRED |
Connector/J properties, passed as they are |
Switching type starts from an empty database. See Installation.
The whole shipped file¶
config.yml
# HCFCore configuration
# Server-wide settings: language, game mode and storage. Every module has its own
# file next to this one, and every gameplay value lives in those files - nothing is
# hardcoded in the plugin. Documentation: https://lawkeys-dev.github.io/hcf-core/
#
# Lines "# --8<-- [start:...]" and "# --8<-- [end:...]" mark the parts the online
# documentation quotes from this file. They are comments and change nothing.
# Language of the messages: lang/<language>.yml in this folder. The plugin ships
# English (en); to translate, copy lang/en.yml to lang/<code>.yml, translate it and
# set its code here.
language: en
# Determines which game mode this server instance runs.
# - false (default): full HCF mode, all systems enabled (Lives system, DTR, claims...).
# - true: Kitmap mode. Modules that don't apply to Kitmap - today, the Lives
# system - do not initialize at all, not just hide their commands. Everything
# else is shaped by the module files (a kitmap usually turns deathbans off in
# pvp.yml, for instance).
# Read at startup only: changing it needs a restart, not /hcf reload.
kitmap-mode: false
# This whole section is read at startup only: changing it needs a restart, not
# /hcf reload. Switching type starts from an empty database - nothing copies the
# data from one to the other.
storage:
# "sqlite" for solo/dev, "mysql" for production.
type: sqlite
# How often the in-memory caches are flushed to the database, in seconds
# (memory is the source of truth; the database is written periodically, in the
# background). A full save also runs on a clean shutdown.
# 0 disables the periodic save, leaving only the shutdown one - not recommended,
# since a crash would then lose everything since startup.
save-interval-seconds: 300
mysql:
host: localhost
port: 3306
database: hcfcore
username: root
# Better left empty: set the environment variable HCFCORE_MYSQL_PASSWORD for
# the server process instead, and a real password never sits in a file. Set
# and not blank, the variable wins over this value; the console says which of
# the two was used (never the password itself).
password: ""
# MySQL Connector/J connection properties, handed to the driver as they are
# (dev.mysql.com/doc/connector-j, "Configuration Properties").
# sslMode PREFERRED - the driver's own default - encrypts whenever the server
# offers TLS, which MySQL 8 does out of the box. It is also what lets MySQL 8's
# default login (caching_sha2_password) work: over an unencrypted connection
# the driver will not fetch the server's key and every connection fails with
# "Public Key Retrieval is not allowed". REQUIRED or VERIFY_IDENTITY insist on
# encryption; a server without TLS needs sslMode: DISABLED and
# allowPublicKeyRetrieval: true.
properties:
sslMode: PREFERRED
# Modules and integrations are not switched here. Each module has its own
# "enabled:" at the top of its own file (kits.yml, redeem.yml, crowbar.yml,
# holograms.yml, lives.yml, claims.yml, pvp.yml...); teams, player statistics and
# the map phases have none, since the rest is built on them.
#
# Vault and LuckPerms are used whenever they are installed: Vault receives the
# economy (economy.yml), LuckPerms supplies the chat prefix and suffix, whose
# format is in chat.yml. The Lunar Client features are switched in apollo.yml.
#
# (A "modules:" and an "integrations:" section used to follow here. Nothing ever
# read them; if your file still has them, they can be deleted.)