zRivals Duels logozRivals Duels

Duel requests

How players challenge each other, accept or decline, and why a request can be refused.

A duel always starts with a request. The challenged player gets a title on screen, a sound, and a chat message with clickable buttons, so nobody misses it and nobody has to type a command to answer.

A flow from a duel request through the shared setup menu, start checks, escrow, snapshot, teleport, countdown and fight to the restore and wager payout.

Sending a request

/duel <player>
/duel challenge <player>

Both do the same thing. The second form always works, even when a player's name is the same as a subcommand. A player called top is challenged with /duel challenge top, because /duel top opens the leaderboard.

The challenged player gets:

  • A title and subtitle. The text lives in the language file under request.title and request.subtitle, and the fade times in config.yml.
  • A chat message with [ACCEPT] and [DECLINE] buttons that run the accept and decline commands for them. Hover text explains each button.
  • The request-received sound.

The sender gets a confirmation message and the request-sent sound.

Answering

/duel accept [player]
/duel decline [player]

With no name, the command answers the newest request. A player can have several requests waiting at once. Accepting one cancels every other request they have sent or received, and the other players are told why. A player waiting in a queue leaves it when the setup menu opens.

Accepting opens the setup menu for both players.

Challenges are unranked. Ranked duels come from the matchmaking queue, so players cannot pick their ranked opponent. Set queue.ranked-challenges: true in config.yml to allow Ranked in challenges again.

When a request is refused

The sender gets a clear message and the request-denied sound when:

SituationMessage key
The sender challenges themselvesrequest.self
The sender is already in a duel, a setup menu or a countdownrequest.you-busy
The target is already in a duel, a setup menu or a countdownrequest.target-busy
The sender already has a request waiting with that playerrequest.already-sent
The sender is still on cooldownrequest.cooldown
The target is offline or hidden from the sendergeneral.player-not-found
The sender does not have zrivalsduels.duelgeneral.no-permission

Hidden means the sender cannot see the target, for example because of a vanish plugin. The plugin treats that the same as offline, so it never gives away a vanished player.

Settings

All in config.yml under requests:

requests:
  # Seconds before an unanswered duel request expires
  expire-seconds: 60
  # Seconds a player must wait between sending requests
  cooldown-seconds: 10
  title:
    # Show a title to the player who receives a request
    enabled: true
    # Title fade in time in ticks
    fade-in: 10
    # Title stay time in ticks
    stay: 60
    # Title fade out time in ticks
    fade-out: 10
KeyWhat it doesDefault
expire-secondsHow long a request waits before it expires. Both players are told when it does60
cooldown-secondsWait between requests from the same sender. zrivalsduels.bypass.cooldown skips it10
title.enabledShow the title and subtitle to the challenged playertrue
title.fade-in, title.stay, title.fade-outTitle timings in ticks (20 ticks is one second)10, 60, 10

To turn off the chat message or change the buttons, edit request.received in the language file. To silence a sound, set its name to "" under sounds in config.yml.

The default subtitle says /duel accept. If you rename the command in commands.yml, edit request.subtitle too, it is plain text.

On this page