zRivals Duels logozRivals Duels

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.

How a message is looked up, first in the language chosen in config.yml, then in en_US, then falling back to the key name with a console warning.

Picking a language

# Language file to use from the lang folder, without the .yml ending
language: en_US

language is the file name in the lang folder, without .yml. Change it and run /duel admin reload.

Three languages ship with the plugin:

FileLanguage
lang/en_US.ymlEnglish
lang/fr_FR.ymlFrench
lang/es_ES.ymlSpanish

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 the prefix message 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.received and stats.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

SectionWhat is in it
prefixThe prefix used by <prefix>
generalNo permission, usage, errors, loading, yes and no words, confirm steps
helpEvery line of /duel help and /duel admin help
requestDuel request messages, the title, subtitle and clickable buttons
setupSetup menu messages, location choices, arena statuses, Fight here reasons and start check failures
duelStart, results, MMR change, wager result, victory and defeat titles, the death message, the Fight here cancel message
protectionBlocked command, drop, container, teleport and block messages
spectateWatching duels, the running duel list, the "is watching your duel" line and leave messages
admin/duel admin end results
kitKit command messages and kit preview effect lines
arenaArena command messages, point names, statuses, problems and "Worth checking" warnings
wagerCurrency, proposal, custom amount, the custom amount sign lines, escrow and payout messages
rankedWhy ranked is blocked, setmmr and resetstats results
statsThe /duel stats chat summary
topThe /duel top chat list
historyMatch history lines, the date format, result and reason words
seasonSeason lists, info, end messages and the broadcast
rewardReward statuses, claim messages, the real money winner message, set and item commands

A few worth knowing:

KeyNotes
request.subtitlePlain text that says /duel accept. Edit it if you rename the command
duel.death-messageUsed when duel.death-message: REPLACE. Tokens <player> <killer>. Empty hides it
reward.winnerThe real money winner message
wager.sign-linesLines 2 to 4 of the custom amount sign. Keep them short
history.date-formatJava date pattern for match history, dd MMM yyyy HH:mm
wager.no-proposalNot 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-nameThe name used for a Fight here duel wherever messages show the arena
setup.arena-status-free, setup.arena-status-busyThe <status> shown on each arena in the location menu

Added in 1.0.0

KeyWhen it shows
setup.own-gear-nameThe name shown for Own gear wherever a kit name shows
setup.own-gear-rule-drop, setup.own-gear-rule-keepThe <rule> token, what happens to the loser's items
setup.gear-own, setup.gear-kitA player switches to Own gear or back to a kit. Tokens <player>, and <rule> for gear-own
setup.own-gear-drop-warningOwn gear is chosen or a player confirms while own-gear.loser-items is DROP
setup.own-gear-ranked, setup.own-gear-no-permissionOwn gear is refused
duel.own-gear-items-lostThe loser of an own gear duel. Tokens <count> <player>
duel.own-gear-items-receivedThe winner got the loser's items. Token <count>
duel.own-gear-items-droppedThe winner's inventory was full. Token <count>
duel.restored-join-own-gearA player joins after an own gear duel was cut short

Added in 1.0.0-8

KeyWhen it shows
queue.joined-ranked, queue.joined-unrankedA player joins a queue, with a clickable leave button
queue.left, queue.not-queued, queue.left-setup, queue.kit-gone, queue.closedA player leaves the queue, or is removed from it
queue.found-ranked, queue.found-unrankedThe queue found a match. Tokens <opponent> <mmr> <kit> <arena>
queue.no-arenaA 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-unrankedThe 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-permissionQueue refusals
setup.ranked-queue-onlyThe mode button is clicked while challenges are unranked only
help.player.entries.queue-ranked, queue-unranked, queue-leaveHelp lines for the queue

Added in 1.0.0-6

KeyWhen it is sent
setup.location-random, setup.location-arena, setup.location-hereA player picks a location. Tokens <player>, and <arena> for location-arena
setup.arena-cleared-kitThe new kit is not allowed in the chosen arena, so the choice went back to Random arena
setup.here-cleared-rankedThe mode was switched to Ranked while Fight here was chosen, so the choice went back to Random arena
setup.here-unavailableFight here cannot be picked. Token <reason>
setup.fail-hereFight here failed the checks when both confirmed. Token <reason>
setup.fail-arena-unavailableThe chosen arena can no longer be used, the choice went back to Random arena
setup.fail-arena-busyThe chosen arena is in use. Token <arena>
duel.here-movedThe 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.

On this page