IMPORTANT, read before you install: the architecture of this plugin has been reworked and its configuration files have changed (config.json now holds the settings only, the texts move to a new lang folder, every setting is explained in config.commented.json). Read the new config files and these notes before you install, back up your config.json, and do not overwrite your old config.json without looking at it first.
This release brings together the changes of 1.1.0, 1.1.1 and 1.2.0. If you come from 1.0.x, read "Upgrading from 1.0.x" in the description before you update, and back up your config.json first.
New config structure (1.1.0)
- config.json now holds the settings only (command name and alias, language, limits, cooldown, access, size and duration of the top-of-screen text). It no longer contains any sentence read by players, and the plugin never writes to it.
- Every setting is explained in config.commented.json, shipped with the plugin and replaced at each update. It is the documentation: read it, do not rename it to config.json.
- The 17 texts players read (Usage, NoTarget, NotYours, NotADino, NoPermission, Cooldown, BadRegion, BadColour, Done, Help1, Help2, and the region names Zone0 to Zone5) are in the lang folder: en.json, fr.json, de.json, es.json. They are replaced at each update, so do not edit them.
- Your own texts go in lang\custom.json. It is never shipped and never overwritten by an update. Format: {"EN": {"Done": "your text"}, "FR": {"Done": "votre texte"}}. A key you leave out keeps the shipped text.
- To add a language, create lang\nl.json (or any 2 or 3 letter code) with the same keys as en.json, or add an "NL" block in custom.json.
- A file that cannot be read (invalid JSON) is ignored with a warning in the log. Nothing is written.
- The old Texts block and the old flat Messages block (Cooldown, Help1, Help2, NoPermission, NoTarget, NotYours, Usage) of config.json are no longer read. Copy the texts you changed into lang\custom.json, under their language. With Z-ARK 0.285.0 or newer this is done for you at install, after a safety copy.
- Three settings are now listed in the shipped config.json, with the same default values as before: General.ChatCommandAlias (a second command name, empty = none, read at server start), Access.UsePermissions (true = in list mode, ask the Permissions plugin first) and Access.PermissionsGroup (Donator). A config.json without them keeps working with these defaults.
- ZColour.Reload re-reads config.json and the lang folder. It answers "settings reloaded (ACTIVE)" or "(DISABLED)", or "reload FAILED, previous settings kept" if config.json cannot be read. ZColour.Status now ends with the texts loaded, for example "texts: lang EN FR DE ES, custom FR:2".
Texts in the language of each player (1.1.0)
- A message meant for one player is sent in that player's own language (the flag chosen in the ZMenu mod, carried by Z-Bridge) when the plugin has texts for it. Otherwise it uses the server language, General.Language.
- Search order for a sentence: lang\custom.json in the player's language, the shipped file of that language, custom.json in English, en.json, then the English text built into the plugin. A player never gets an empty message.
- The confirmation now names the region: "Colour 79 applied: body."
Where messages show (1.2.0)
- Each player chooses where the messages of Z-Colour show with /msg both, /msg chat or /msg top (/msg alone shows the current choice). The choice is handled by Z-Messages (1.2.0 or newer), remembered per player, and shared by all our plugins. The server default is PlayerDisplay.Default in the Z-Messages config (shipped: both).
- By default the messages now show in the chat and at the top of the screen. Before, only the top-of-screen banner was shown unless Notifications.AlsoChat was on. That setting is gone: it is no longer read.
- Notifications.Scale and Notifications.DisplayTime still set the size and the duration of the top-of-screen text.
- A text longer than Style.TopOfScreenMaxLength in the Z-Messages config (shipped: 80 characters) goes to the chat only.
- Without Z-Messages 1.2.0 or newer, messages go to the chat and to the top of the screen.
Other
- Safer unload (1.1.1): when the server unloads the plugin, it now gives back the crash handler it set up at start.
- Texts shipped in English, French, German and Spanish.