Skip to content

Languages and messages

All messages are in the lang/ files. This page covers changing the language, adding your own, the prefix, the time format and turning messages off.

Two files are included: lang/en.yml (English) and lang/pl.yml (Polish). Set the language in config.yml:

language: en
  1. Copy lang/en.yml to lang/<code>.yml, e.g. lang/de.yml.
  2. Translate the texts (and the comments, if you like).
  3. Set language: de in config.yml and use /szpontafkzone reload.

Your comments are kept. Options added by later versions are added in English, with their documentation.

  • A message is one line ('...') or a list of lines (- ...). Every line is sent as a separate chat line.
  • '' (or []) turns a message off: nothing is sent.
  • A deleted message is added back with its default text on the next reload or restart. To turn a message off, set it to '' instead.
  • {prefix} in every message is replaced with prefix (below), and {player} with the name of the player who gets it (CONSOLE for the console).
  • Command messages also have {label}: the command name the sender typed, e.g. afkzone. The other placeholders are listed above each message in the file.
  • PlaceholderAPI placeholders (%...%) work too when it is installed, but not in messages to the console.
Key Description
prefix Inserted wherever a message contains {prefix}. '' means no prefix.
time-format Format of times such as {time_left} and {interval}. Default: '{mm}:{ss}'.
number-format.decimal-separator Separates the whole part from the decimal part, e.g. in {chance}. A dot in en.yml (12.5), a comma in pl.yml (12,5).
placeholders Words returned by the plugin’s PlaceholderAPI placeholders: yes, no and none (no value, e.g. %szpontafkzone_zone% outside a zone).
Token Meaning
{h}, {m}, {s} Hours, minutes and seconds
{hh}, {mm}, {ss} The same, always with two digits (05)

The largest unit in the format also counts everything above it: with '{mm}:{ss}' 75 minutes are shown as 75:00, with '{h}:{mm}:{ss}' as 1:15:00. '' restores the default.

Texts in the language files use the text-format syntax. See Text formatting.