zRivals Duels logozRivals Duels

Arenas

Building arenas with spawns, a combat region and boundaries, and how the arena for each duel is chosen.

An arena is where the fight happens. You stand where things should go and run a command for each point, the plugin checks the arena is complete and tells you exactly what is missing. By default each duel gets a random free arena, players can also pick one themselves in the setup menu, and two duels can never land in the same one.

A top down arena with the combat region inside the boundaries, both spawns inside the region, the exit outside the boundaries, and the rules that make an arena ready.

The parts of an arena

PartWhat it isSet with
Spawn 1 and spawn 2Where each player appears, including the direction they facesetspawn1, setspawn2
Combat regionA box where the fight happens. Blocks can only be placed or broken in here, and only if the kit allows itsetregion <name> pos1 and pos2
BoundariesA bigger box players cannot leave. It must fully contain the combat region. Only its sides count unless duel.boundary-check-height is truesetbounds <name> pos1 and pos2
ExitWhere players are sent after the duel. Optional when duel.return-to is PREVIOUS_LOCATIONsetexit
SpectatorWhere spectators watch from. Optional, without it spectators are placed between the two spawns, see Spectatingsetspectator

The region and boundary corners use the block you are standing on. Spawns, exit and spectator use your exact position and facing.

Building one

Create it

/duel arena create <name>

Arena names use lower case letters, digits, - and _. This creates arenas/<name>.yml.

Mark the region and boundaries

Stand on the floor in one corner of the fighting area and run /duel arena setregion <name> pos1. Then go to the opposite corner, a few blocks higher up, and run setregion <name> pos2. Do the same for the outer limits with setbounds.

Do not set both corners standing on the same floor. The box is then only one block tall: blocks can only be placed at that height, and with duel.boundary-check-height: true every jump counts as leaving the arena.

Set the spawns and exit

Stand in each spawn, facing where the player should look, and run setspawn1 and setspawn2. Both spawns must be inside the combat region. Then stand where players should go afterwards and run setexit. The exit can be skipped when duel.return-to is PREVIOUS_LOCATION.

Optionally, stand where spectators should watch from and run setspectator.

Check it

/duel arena info <name>

Every point shows as set or missing, followed by the status and a list of anything blocking the arena. When the last missing piece is set, you get a "now ready for duels" message.

Below that, a "Worth checking" list shows setup warnings. They do not stop the arena from being used:

WarningWhen it shows
The combat region is only a few blocks tallThe region is under 3 blocks tall
The boundaries are only a few blocks tallThe boundaries are under 3 blocks tall and duel.boundary-check-height is true
No spectator point is setsetspectator was never run, spectators are placed between the two spawns

When an arena is used

An arena is only picked when all of this is true:

  • spawn 1, spawn 2 and all four corners are set
  • the exit is set, unless duel.return-to is PREVIOUS_LOCATION
  • the region corners are in one world, the boundary corners are in one world, and both boxes are in the same world
  • the boundaries fully contain the combat region
  • both spawns are inside the combat region
  • the arena is enabled
  • every world it uses is loaded
  • no other duel is using it
  • its allowed-kits list is empty, or contains the chosen kit

Which arena is used depends on the location chosen in the setup menu:

LocationArena used
Random arenaThe default. One of the arenas that pass is picked at random. If none is free, both players get the "no arena is free" message and stay in the setup menu with confirmations cleared
A chosen arenaThat arena, as long as it still passes. If another duel is using it, both players go back to the setup menu and are told it is in use. If it was disabled, deleted or no longer allows the kit, the choice goes back to Random arena and they confirm again
Fight hereNo arena. The duel happens where the two players stand, see Fight here

The location menu lists only arenas that are ready and allow the chosen kit, each marked Free or In use.

The pick happens in one step on the main server thread, so two duels starting at the same moment can never take the same arena.

Status

/duel arena list shows every arena with one of these:

StatusMeaning
ReadyCan be used right now
In useA duel is running in it
DisabledTurned off with /duel arena disable
IncompleteSomething is missing or outside where it should be. Run info to see what
World not loadedA world the arena uses is not loaded

Fight here cannot be used while either player stands inside the boundaries of any arena, so arenas are never turned into an open Fight here area by accident.

Changing an arena that is in use

A running duel keeps the arena exactly as it was when the duel started. If you move a spawn, disable the arena or delete it during a duel, you are told a duel is running, the duel finishes normally, and the change applies to the next one.

Arena commands

All need zrivalsduels.admin.arena. The commands that use your position must be run in game.

CommandWhat it does
/duel arena create <name>Create an arena
/duel arena delete <name>Delete an arena. Asks you to run the confirm command shown in chat within 30 seconds
/duel arena setspawn1 <name>Set spawn 1 at your position and facing
/duel arena setspawn2 <name>Set spawn 2 at your position and facing
/duel arena setregion <name> pos1Set a corner of the combat region (pos1 or pos2)
/duel arena setbounds <name> pos1Set a corner of the boundaries (pos1 or pos2)
/duel arena setexit <name>Set the exit
/duel arena setspectator <name>Set the spectator point at your position and facing
/duel arena enable <name>Turn the arena on. Warns you if it is not ready yet
/duel arena disable <name>Turn the arena off
/duel arena info <name>Show what is set, what is missing and the status
/duel arena listList every arena with its status. Click a line for info
/duel arena tp <name>Teleport to spawn 1, or to the exit if spawn 1 is not set

The arena file

Positions are written by the commands above. The three keys worth editing by hand are:

# Name shown in messages, MiniMessage format
display-name: "<gold>Arena"
# Allow duels in this arena
enabled: true
# Kit names allowed in this arena, leave empty to allow every kit
allowed-kits: []

Use allowed-kits to keep a build kit in a build arena, for example allowed-kits: [builduhc]. Apply file edits with /duel admin reload.

On this page