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
# 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:
- unrankedThe file starts with commands-version: 3. Leave it alone, it tells the plugin which keys to add when you update.
| Key | What it does | Default |
|---|---|---|
command | The main command | duel |
aliases | Other names for the main command | duels, zrivals |
subcommands.<id> | The word typed for each subcommand. Change the value on the right, keep the id on the left | the 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.
| Key | What it does | Default |
|---|---|---|
shortcuts.ranked | The command that joins the ranked queue. The first name is the command, the rest are aliases | ranked |
shortcuts.unranked | The command that joins the unranked queue | unranked |
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: denyReload
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 helpand/duel admin helppages- Tab completion
- Clickable buttons in chat, like [ACCEPT], [DECLINE], page arrows and "click to confirm"
command-blocker.allowed-duel-subcommandsinconfig.yml, which uses the ids, so a renamedforfeitstill works during a duel
What does not change
The words after these subcommands are fixed:
| Subcommand | Fixed words |
|---|---|
admin | help, reload, end, setmmr, resetstats, history |
kit | create, update, delete, load, restore, seticon, rename, preview, list |
arena | create, delete, setspawn1, setspawn2, setregion, setbounds, setexit, setspectator, enable, disable, info, list, tp, pos1, pos2 |
reward | item, set, add, list, remove, clear, create, delete, pending, markpaid, all |
queue | ranked, unranked, leave |
season | info, end, history |
| Confirm steps | confirm |
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.