Messages and Language
Editing messages in MiniMessage, turning messages off, and adding your own language file.
Every message players see is in a language file: chat lines, titles, subtitles, action bars, hover text, button text and reward statuses. You can reword any of them, change the colours, turn some off, or translate the whole plugin.
Picking a language
# Language file to use from the lang folder, without the .yml ending
language: en_USlanguage is the file name in the lang folder, without .yml. Change it and run /duel admin reload.
Three languages ship with the plugin:
| File | Language |
|---|---|
lang/en_US.yml | English |
lang/fr_FR.yml | French |
lang/es_ES.yml | Spanish |
Set language: fr_FR or language: es_ES to switch. Any other language can be added the same way, see below.
Adding a language
Copy the English file
Copy lang/en_US.yml to a new file named with a Java locale name, for example lang/de_DE.yml.
Translate it
Change the text in quotes. Keep the keys on the left, the <tokens> and the tags the same.
Select it
Set language: de_DE in config.yml and run /duel admin reload.
You do not have to translate everything at once. Any key missing from your file is read from en_US.yml. If the file you pick does not exist, English is used and the console says so. If a key is missing from both, the key name itself is shown and a console warning names it.
Writing messages
Messages use MiniMessage tags:
request:
# Request was sent, tokens: <player> <seconds>
sent: "<prefix><green>Duel request sent to <white><player></white>. <gray>It expires in <white><seconds>s</white>."- Colours and styles:
<red>,<gold>,<#ffd27a>,<bold>,<gradient:gold:red>. - Tokens: words in angle brackets like
<player>are filled in by the plugin. The comment above each message lists the tokens it has. - Prefix:
<prefix>inserts theprefixmessage at the top of the file, so you can change the prefix in one place. - Buttons:
<click:run_command:'/duel accept'>and<hover:show_text:'...'>make clickable text. Tokens work inside them. - Lists: some messages are lists, one chat line per entry, for example
request.receivedandstats.summary.
Turning a message off
Set a message to an empty string and it is not sent:
setup:
opened: ""For titles, the title is skipped only when both the title and the subtitle are empty.
Where things are
| Section | What is in it |
|---|---|
prefix | The prefix used by <prefix> |
general | No permission, usage, errors, loading, yes and no words, confirm steps |
help | Every line of /duel help and /duel admin help |
request | Duel request messages, the title, subtitle and clickable buttons |
setup | Setup menu messages, location choices, arena statuses, Fight here reasons and start check failures |
duel | Start, results, MMR change, wager result, victory and defeat titles, the death message, the Fight here cancel message |
protection | Blocked command, drop, container, teleport and block messages |
spectate | Watching duels, the running duel list, the "is watching your duel" line and leave messages |
admin | /duel admin end results |
kit | Kit command messages and kit preview effect lines |
arena | Arena command messages, point names, statuses, problems and "Worth checking" warnings |
wager | Currency, proposal, custom amount, the custom amount sign lines, escrow and payout messages |
ranked | Why ranked is blocked, setmmr and resetstats results |
stats | The /duel stats chat summary |
top | The /duel top chat list |
history | Match history lines, the date format, result and reason words |
season | Season lists, info, end messages and the broadcast |
reward | Reward statuses, claim messages, the real money winner message, set and item commands |
A few worth knowing:
| Key | Notes |
|---|---|
request.subtitle | Plain text that says /duel accept. Edit it if you rename the command |
duel.death-message | Used when duel.death-message: REPLACE. Tokens <player> <killer>. Empty hides it |
reward.winner | The real money winner message |
wager.sign-lines | Lines 2 to 4 of the custom amount sign. Keep them short |
history.date-format | Java date pattern for match history, dd MMM yyyy HH:mm |
wager.no-proposal | Not used. The "no wager proposal" message is setup.no-proposal |
setup.here.* | The reasons Fight here is refused: disabled, offline, no-permission, other-world, world-disabled, too-far (tokens <distance> <max>), inside-arena, no-pvp, ranked, world-pvp. Plain text, they are placed into setup.here-unavailable, setup.fail-here and the locked button's lore |
setup.here-arena-name | The name used for a Fight here duel wherever messages show the arena |
setup.arena-status-free, setup.arena-status-busy | The <status> shown on each arena in the location menu |
Added in 1.0.0
| Key | When it shows |
|---|---|
setup.own-gear-name | The name shown for Own gear wherever a kit name shows |
setup.own-gear-rule-drop, setup.own-gear-rule-keep | The <rule> token, what happens to the loser's items |
setup.gear-own, setup.gear-kit | A player switches to Own gear or back to a kit. Tokens <player>, and <rule> for gear-own |
setup.own-gear-drop-warning | Own gear is chosen or a player confirms while own-gear.loser-items is DROP |
setup.own-gear-ranked, setup.own-gear-no-permission | Own gear is refused |
duel.own-gear-items-lost | The loser of an own gear duel. Tokens <count> <player> |
duel.own-gear-items-received | The winner got the loser's items. Token <count> |
duel.own-gear-items-dropped | The winner's inventory was full. Token <count> |
duel.restored-join-own-gear | A player joins after an own gear duel was cut short |
Added in 1.0.0-8
| Key | When it shows |
|---|---|
queue.joined-ranked, queue.joined-unranked | A player joins a queue, with a clickable leave button |
queue.left, queue.not-queued, queue.left-setup, queue.kit-gone, queue.closed | A player leaves the queue, or is removed from it |
queue.found-ranked, queue.found-unranked | The queue found a match. Tokens <opponent> <mmr> <kit> <arena> |
queue.no-arena | A match was found but no arena is free, sent once |
queue.status-ranked, queue.status-unranked | /duel queue while waiting |
queue.action-bar-ranked, queue.action-bar-unranked | The action bar while waiting, empty turns it off |
queue.usage, queue.disabled, queue.busy, queue.no-kits, queue.no-ranked-permission, queue.kit-unknown, queue.kit-not-ranked, queue.kit-no-permission | Queue refusals |
setup.ranked-queue-only | The mode button is clicked while challenges are unranked only |
help.player.entries.queue-ranked, queue-unranked, queue-leave | Help lines for the queue |
Added in 1.0.0-6
| Key | When it is sent |
|---|---|
setup.location-random, setup.location-arena, setup.location-here | A player picks a location. Tokens <player>, and <arena> for location-arena |
setup.arena-cleared-kit | The new kit is not allowed in the chosen arena, so the choice went back to Random arena |
setup.here-cleared-ranked | The mode was switched to Ranked while Fight here was chosen, so the choice went back to Random arena |
setup.here-unavailable | Fight here cannot be picked. Token <reason> |
setup.fail-here | Fight here failed the checks when both confirmed. Token <reason> |
setup.fail-arena-unavailable | The chosen arena can no longer be used, the choice went back to Random arena |
setup.fail-arena-busy | The chosen arena is in use. Token <arena> |
duel.here-moved | The players moved too far apart right before the countdown and the duel was cancelled |
Leave lang-version at the top alone, it is 6 from 1.0.0. When an update adds messages, they are added to the bundled English file on the next start and your edits are kept.