NationCrest

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_US

Which 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
ValueMeaning
autoLocal database if one is usable, otherwise the website. Default
maxmindLocal database only
httpWebsite 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
KeyWhat it doesDefault
licence-keyYour MaxMind licence key. Leave empty to place the file by handempty
account-idThe account ID that goes with the key. Both are needed to download0
database-fileFile name looked for in the plugin folderGeoLite2-Country.mmdb
auto-downloadFetch the database on first start when a key is settrue
refresh-daysDays between update checks. 0 never refreshes3

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
KeyWhat it doesDefault
urlThe lookup endpoint. {ip} is replaced with the addressipapi.co
fieldPath to the country code in the JSON, dots for nested fieldscountry_code
connect-timeout-msHow long to wait for the connection3000
read-timeout-msHow long to wait for the response5000
failure-thresholdFailures in a row before the cooldown starts5
cooldown-secondsHow long to stop calling out for300

lookup

lookup:
  cache-ttl-seconds: 900
  default-country: US
  proxy-warning: true
KeyWhat it doesDefault
cache-ttl-secondsHow long an address stays cached before it is looked up again900
default-countryUsed for local and private addresses. Empty leaves them with no countryUS
proxy-warningWarn once per start when IP forwarding looks misconfiguredtrue

storage

storage:
  flush-interval-seconds: 60

How 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??'
KeyWhat it doesDefault
modecode, custom or unicodecode
formatWrapped around the flag. {flag} is the country&7[{flag}&7]
default-colourApplied when a country sets no colour of its own&f
fallbackReturned 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: true

Warn 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.

On this page