Everything else

Messages and translations

Every line the plugin sends lives in messages/, one file per part of the plugin.

plugins/ChorusCore/
  palette.yml
  messages/
    core.yml        refusals, /chorus, and the words other lines borrow
    chat.yml        /msg /reply /ignore /mail /socialspy
    economy.yml     /balance /pay /baltop /eco /paylog
    homes.yml       /home /sethome /delhome /homes /renamehome /homeicon
    items.yml       the item tools, and the inventory backups
    kits.yml        /kit /kits /kitedit
    menus.yml       every word that appears on a screen
    players.yml     /afk /seen /playtime /whois /list /nick /ptime /pweather
    shops.yml       chest shops, sign shops, /sell and /worth
    spawn.yml       /spawn /setspawn
    staff.yml       /tp /vanish /gamemode /freeze /sudo /lockdown and the rest
    teleport.yml    /tpa /tpahere /tpaccept /tpdeny /back /tptoggle
    utility.yml     /heal /feed /fly /god /ping /fix /trash and the portable ones
    warps.yml       /warp /warps /setwarp /delwarp /warpinfo /warpset
    world.yml       /world /time /weather /spawnmob /sweep /locate

They are read as one set of keys, so which file a line sits in is a question for whoever is editing them. A key is a key: home.created means the same thing wherever it is written.

957 lines in English, across those fifteen files. There are no hardcoded strings in the code, which is what makes a full translation possible.

# messages/homes.yml
home:
  created: '%prefix%<c:muted>Home <white>%home%</white> saved.'
  deleted: '%prefix%<c:muted>Home <white>%home%</white> deleted.'

Colours#

Three ways to write them, and all three work in the same line:

MiniMessage <gold>, <gradient:#a06bff:#e0c3fc>
The old codes &6, &l
Palette names <c:accent>, closed with </c> — see Colours

Write && for an & that is not a colour.

Both hex spellings work: &#a1b2c3, and &x&a&1&b&2&c&3 the way the old proxies wrote it. A colour code clears the formatting before it, exactly as it does in vanilla, so &l&cText comes out red and not bold.

The full tag list is in the MiniMessage documentation. The ones that come up:

Tag Effect
<red> <gold> <gray> <white> <dark_gray> The sixteen named colours
<#a1b2c3> Any hex colour
<gradient:#a06bff:#e0c3fc> A gradient across the text inside it
<bold> <italic> <underlined> Formatting, closed with </bold>
<newline> A line break inside one message
<hover:show_text:'...'> A tooltip
<click:run_command:'/home'> Clickable text

Text a player writes#

Everything above is about lines you write, in a config file, and those take all of MiniMessage. Text a player types in game is more limited, and how limited depends on where it is typed.

/itemname, item lore (/lore), and name: and lore: in /give. A player holding chorus.items.format can use every MiniMessage tag the server knows: colours, decorations, gradients, <rainbow>, pride flags, <newline>, <font:...>, <sprite:...>, <head:...> and the rest. Only click, hover, insertion, selector, nbt and score stay blocked, and are left in the text exactly as typed. A player without that permission gets their text exactly as typed. <sprite> and <head> only draw on game versions that support them.

/nick and /editsign take colours and formatting, and nothing else. For a player who has the permission to use formatting at all, what works is:

Colour codes &c, &#ff5555, &x&f&f&5&5&5&5
Colours <red>, <#ff5555>, <color:...>
Formatting <bold>, <italic>, <underlined>, <strikethrough>, <obfuscated>, and &l &o &n &m &k
Gradients <gradient:...>, <rainbow>, <transition:...>
Reset <reset>, &r

Anything else — <click:...>, <hover:...>, <insert:...>, <font:...>, <selector:...> — is not read there, and stays in the text exactly as it was typed.

Why click and hover are blocked everywhere: a click tag on a sign runs its command with the permissions of whoever clicks it. Without this rule, a sign a player wrote could run a command for the next admin to walk past.

The prefix#

%prefix% is the prefix line at the top of messages/core.yml.

Any file in the folder may open with a prefix of its own, and %prefix% then means that one in that file and nowhere else:

# messages/shops.yml
prefix: '<c:accent><bold>Shop</bold></c> <c:muted>| '

That is how one module can announce itself differently without every one of its lines spelling the difference out.

Silencing a line#

Leave it empty and it is not sent at all:

cooldown:
  wait: ''

That is the way to take a line out. Deleting the key gives you the shipped English one back, since a missing key falls through to the default.

Placeholders#

Each message has its own, written %like_this%. The shipped files show which ones a line takes; a placeholder that does not belong to that message is left as written.

Values are put in as text, never as formatting. A player whose home is called <red> sees those five characters, not a colour — and the same goes for &-codes. Nobody can write their way into looking like somebody else, or into a clickable link.

Item names and lore#

Item names and lore are not quietly italicised the way the game does it by default, and a line of lore that names no colour is drawn grey rather than the purple the game falls back to.

Neither is written into your file. What you type is stored exactly as you typed it, the styling happens when the line is drawn, and an editor screen shows you the plain text back.

This applies to /itemname and /lore too. Anyone holding chorus.items.format can use every MiniMessage tag there except the blocked ones — see Text a player writes.

A note on bold#

Bold is for a heading, not for a value. A name that comes out of the data — a player, a home, a warp, an item — is written in white against grey rather than in bold, because a bold word in the middle of a sentence reads as shouting. The shipped messages follow that; yours do not have to.

Changing a message#

  1. Edit the file in messages/ that holds it.
  2. /chorus reload.

Keep the key. Change the value. A key that is not one the plugin knows is ignored.

Changing one line for one command only, rather than everywhere it is used, is a messages block in that command's own config — see Per-command rules.

Keys for cooldowns, refunds, item prices and tax#

These keys ship in English and Spanish.

Key When
cooldown.wait-world A command with cooldown-scope: world is still cooling down.
cooldown.wait-server A command with cooldown-scope: server is still cooling down.
cooldown.used-up The day's uses-per-day are spent. Placeholders %uses% and %time%.
economy.refunded A price taken on use was given back. Placeholder %price%.
economy.insufficient-items The player lacks the items of a price-item. %amount%, %item%, %held%.
economy.charged-items The items were taken. %amount%, %item%.
economy.refunded-items The items were given back after a cancelled teleport. %amount%, %item%.
shops.chest-limit-world The player reached the shop limit of that world. %limit%, %world%.
economy.pay-sent-taxed A payment had tax taken. %amount%, %player%, %tax%, %received%.

shops.chest-list-header also takes %limit% now, and the receiver's economy.pay-received shows what they actually got.

All messages and menus were reviewed for wording: one word per thing in English and Spanish (balance/saldo, price/precio, menu/menú, backup/copia de seguridad, location/ubicación...). Words inside a message (whois modes, compass points, staff log actions, backup reasons) follow each player's language when language: per-player is on.

Translations#

Other languages are folders inside messages/:

messages/
  es/
    core.yml
    homes.yml
    ...

A translation only writes down the lines it translates, in as many or as few files as it likes. Anything it leaves out comes from English, so a translation is never out of date, only incomplete. See Languages.

Coming from an older version#

A messages.yml, menus.yml or messages_es.yml left in the plugin folder is still read, on top of the folder, and its lines win. Nothing edited on an older version is lost.

The console says so once at startup. Move what you changed into the folder and delete the old file when you are ready; the plugin does not need it gone.

A prefix set in an old messages.yml is used everywhere, not only for the lines that file holds.