Configuration
Every key in config.yml, what it controls and what it defaults to.
plugins/NationCrest/config.yml. Every key is listed here.
The file is version managed, so updating the plugin adds new keys without wiping your settings. Do not remove config-version.
Language
language: en_USWhich file to load out of the lang folder, without the .yml. en_US, fr_FR and es_ES ship with the plugin. Drop in your own and set this to match. See Messages and language.
Provider
provider: auto| Value | Meaning |
|---|---|
auto | Local database if one is usable, otherwise the website. Default |
maxmind | Local database only |
http | Website only |
Covered in full on Country detection.
maxmind
maxmind:
licence-key: ''
account-id: 0
database-file: GeoLite2-Country.mmdb
auto-download: true
refresh-days: 3| Key | What it does | Default |
|---|---|---|
licence-key | Your MaxMind licence key. Leave empty to place the file by hand | empty |
account-id | The account ID that goes with the key. Both are needed to download | 0 |
database-file | File name looked for in the plugin folder | GeoLite2-Country.mmdb |
auto-download | Fetch the database on first start when a key is set | true |
refresh-days | Days between update checks. 0 never refreshes | 3 |
http
http:
url: 'https://ipapi.co/{ip}/json/'
field: country_code
connect-timeout-ms: 3000
read-timeout-ms: 5000
failure-threshold: 5
cooldown-seconds: 300| Key | What it does | Default |
|---|---|---|
url | The lookup endpoint. {ip} is replaced with the address | ipapi.co |
field | Path to the country code in the JSON, dots for nested fields | country_code |
connect-timeout-ms | How long to wait for the connection | 3000 |
read-timeout-ms | How long to wait for the response | 5000 |
failure-threshold | Failures in a row before the cooldown starts | 5 |
cooldown-seconds | How long to stop calling out for | 300 |
lookup
lookup:
cache-ttl-seconds: 900
default-country: US
proxy-warning: true| Key | What it does | Default |
|---|---|---|
cache-ttl-seconds | How long an address stays cached before it is looked up again | 900 |
default-country | Used for local and private addresses. Empty leaves them with no country | US |
proxy-warning | Warn once per start when IP forwarding looks misconfigured | true |
storage
storage:
flush-interval-seconds: 60How often pending changes are written to data.yml. Writes always happen on a background thread, and a final save runs when the server shuts down. See Storage.
display
display:
mode: code
format: '&7[{flag}&7]'
default-colour: '&f'
fallback: '&7??'| Key | What it does | Default |
|---|---|---|
mode | code, custom or unicode | code |
format | Wrapped around the flag. {flag} is the country | &7[{flag}&7] |
default-colour | Applied when a country sets no colour of its own | &f |
fallback | Returned when the country is unknown or the flag is hidden | &7?? |
Covered in full on Display modes.
tab-list
tab-list:
enabled: true
format: '{display} {player}'nametag
nametag:
enabled: false
format: '{display} 'Both covered on Tab list and nametags.
conflict-warning
conflict-warning: trueWarn on start when a known tab list or nametag plugin is installed and the matching feature above is on. It only logs, it never changes a setting.
Applying changes
Run /flag reload. It reloads config.yml, countries.yml and the language file, pushes the new settings into everything that holds a copy, and refreshes every online player's tab list name and nametag.
A reload also reopens the country database, so a file you have just dropped in is picked up without restarting the server. That part runs on a background thread, so the command comes back immediately and the log tells you the result a moment later. A missing database warning is only repeated when something about it has changed, so reloading does not fill your log with the same lines.