Messages and language
Editing every message the plugin sends, adding your own translation, and the full list of keys.
Every player facing string lives in a language file, and so do the console lines. Nothing is hardcoded.
Picking a language
language: en_USNames a file in plugins/WandWorks/lang/, without the .yml. Three ship translated and are rewritten on every start, so a mistake in one is one delete away from being fixed.
| Value | File |
|---|---|
en_US, or the old short name en | en_US.yml |
fr_FR, or the old short name fr | fr_FR.yml |
es_ES, or the old short name es | es_ES.yml |
A name that matches no file falls back to en_US with a console warning.
Adding your own translation
Copy a shipped file
Copy en_US.yml to a new name in the same folder, for example de_DE.yml.
Translate the values
Only the values. Leave the keys and the {placeholders} exactly as they are.
Point at it
Set language: de_DE in config.yml, then /wandworks reload.
The three shipped files are rewritten with their defaults merged in on every start, so give yours a different name. A file WandWorks did not ship is left completely alone, which also means it gets no new keys on an update. A missing key prints as a visible "Missing language key" line rather than nothing, so you can see what to add.
The prefix
prefix: "&8[&aWandWorks&8] &r"Goes in front of every player message. Set it to "" to drop it. {prefix} also works inside any message if you want it somewhere other than the start.
Switching a message off
Set a message to an empty string and it is not sent at all.
wand:
broke: ""The action still happens, the player just hears nothing about it.
Colours
Legacy ampersand codes plus &#RRGGBB for hex:
success: "ade80Sold &f{items} ade80items for &f{money}ade80."Console lines have their colour stripped before printing, since a console is not a chat window.
The keys
| Key | Placeholders |
|---|---|
no-permission | none |
reload-success | none |
reload-failed | none |
invalid-number | {input} |
player-not-found | {player} |
wand-not-found | {wand} |
inventory-full | none |
wand-list-header | {count} |
wand-list-entry | {id}, {type} |
given-wand | {player}, {wand}, {amount} |
received-wand | {wand} |
usage-header | none |
usage-give | none |
usage-list | none |
usage-reload | none |
| Key | Placeholders |
|---|---|
no-permission | none |
cooldown | {seconds}, rounded up |
out-of-uses | none |
broke | none |
| Key | Placeholders |
|---|---|
not-a-container | none |
empty-container | none |
nothing-priced | none |
unpriced-blocked | {material} |
below-minimum | {minimum} |
success | {money}, {items}, {boost} |
success-with-boost | {money}, {items}, {boost} |
money-only | {money}, {items}, {boost} |
capped | {cap}, {money} |
economy-missing | none |
| Key | Placeholders |
|---|---|
no-blocks | none |
success | {placed}, {cost} |
success-paid | {placed}, {cost} |
partial-inventory | {placed}, {cost} |
partial-payment | {placed}, {cost} |
cannot-afford | none |
no-buy-price | {material} |
nothing-placed | none |
blocked-material | none |
economy-missing | none |
bag-on | none |
bag-off | none |
bag-unavailable | none |
bag-outdated | none |
| Key | Placeholders |
|---|---|
outside | none |
not-member | none |
| Key | Used by |
|---|---|
bag-on | The {bag} lore placeholder when bag use is on |
bag-off | The {bag} lore placeholder when bag use is off |
These two are not messages. They are the words that get substituted into a wand's lore, which is why they translate with everything else.
| Key | Placeholders |
|---|---|
price-sources | {sources} |
price-source-unknown | {id}, {valid} |
price-source-unavailable | {plugin} |
price-source-failed | {plugin} |
price-lookup-failed | {plugin} |
bag-api-not-ready | none |
bag-api-unreadable | none |
bag-api-cannot-take | none |
bag-call-failed | {reason} |
Colour codes in these are stripped before printing. Leave them in English if you read your logs in English, even when the rest of the file is translated.
Two keys nothing reads
The shipped files carry general.player-only and wand.uses-left. Neither is sent by anything in the current release, so editing them changes nothing. They are listed here so you do not spend an evening wondering why your new wording never shows up.
Versioning
Every language file carries a config-version at the top. That is how a new key from an update merges into the file you have already translated, leaving your wording alone. Leave it as it is.