zRivals Duels logozRivals Duels

Commands file

Renaming the main command, its aliases and every subcommand label in commands.yml.

Every command name players type can be changed. Want /fight join instead of /duel accept, or French command words? Edit commands.yml and reload. Help pages, tab completion and the clickable chat buttons all follow your new names.

commands.yml before and after renaming duel to fight and accept to join, showing the typed command change from duel accept Steve to fight join Steve.

commands.yml

# Name of the main command
command: duel

# Other names for the main command
aliases:
  - duels
  - zrivals

subcommands:
  # Accept a duel request
  accept: accept
  # Decline a duel request
  decline: decline
  # Challenge a player, works even when their name matches a subcommand
  challenge: challenge
  # Reopen the duel setup menu
  menu: menu
  # Give up the current duel
  forfeit: forfeit
  # Join or leave the ranked and unranked queues
  queue: queue
  # Watch a running duel
  spectate: spectate
  # Stop watching a duel
  leave: leave
  # Show duel stats
  stats: stats
  # Show the ranked leaderboard
  top: top
  # Open the season rewards menu
  rewards: rewards
  # Show season information
  season: season
  # Show command help
  help: help
  # Admin commands
  admin: admin
  # Kit admin commands
  kit: kit
  # Arena admin commands
  arena: arena
  # Reward admin commands
  reward: reward

shortcuts:
  # Command that joins the ranked queue, the first name is the command and the rest are aliases, an empty list turns it off
  ranked:
    - ranked
  # Command that joins the unranked queue, the first name is the command and the rest are aliases, an empty list turns it off
  unranked:
    - unranked

The file starts with commands-version: 3. Leave it alone, it tells the plugin which keys to add when you update.

KeyWhat it doesDefault
commandThe main commandduel
aliasesOther names for the main commandduels, zrivals
subcommands.<id>The word typed for each subcommand. Change the value on the right, keep the id on the leftthe same as the id

Names are always lower case. An empty label falls back to the id.

Queue shortcuts

shortcuts adds two commands of their own, outside /duel, that join the matchmaking queue. /ranked is the same as /duel queue ranked and /unranked the same as /duel queue unranked. Running one again leaves that queue.

KeyWhat it doesDefault
shortcuts.rankedThe command that joins the ranked queue. The first name is the command, the rest are aliasesranked
shortcuts.unrankedThe command that joins the unranked queueunranked

Leave a list empty (ranked: []) to turn that command off. If another plugin already has /ranked, the other plugin keeps the plain name and this one is still reachable as /zrivalsduels:ranked, or pick another name here.

Renaming, step by step

Edit the file

command: fight
aliases:
  - pvp
subcommands:
  accept: join
  decline: deny

Reload

Run /duel admin reload (from now on, /fight admin reload). The old command is removed and the new one is registered straight away, no restart needed.

Update the plain text

A few messages mention a command as plain text rather than through the label. The default request.subtitle in the language file says /duel accept, edit it to match. See Messages and Language.

What follows the new names

  • /duel help and /duel admin help pages
  • Tab completion
  • Clickable buttons in chat, like [ACCEPT], [DECLINE], page arrows and "click to confirm"
  • command-blocker.allowed-duel-subcommands in config.yml, which uses the ids, so a renamed forfeit still works during a duel

What does not change

The words after these subcommands are fixed:

SubcommandFixed words
adminhelp, reload, end, setmmr, resetstats, history
kitcreate, update, delete, load, restore, seticon, rename, preview, list
arenacreate, delete, setspawn1, setspawn2, setregion, setbounds, setexit, setspectator, enable, disable, info, list, tp, pos1, pos2
rewarditem, set, add, list, remove, clear, create, delete, pending, markpaid, all
queueranked, unranked, leave
seasoninfo, end, history
Confirm stepsconfirm

Player names that match a subcommand

Subcommand labels always win over player names. If you rename top to leaderboard, a player named leaderboard is challenged with /duel challenge leaderboard. See Commands for how /duel reads what is typed.

On this page