Arenas
Create arenas, set their spawns and learn how PandaDuels resets them after every match.
An arena is a box in one world where matches are played. It has:
- Bounds: the box itself. Players can't walk out of it, and falling below it puts them out of the round.
- Spawns: at least one starting point for team 1 and one for team 2. You can add more.
- A spectator spawn (optional).
- A kit list (optional): which kits may use the arena. Empty means any kit.
- An on/off switch. New arenas start off.
Arenas are saved in plugins/PandaDuels/arenas.yml. Arena names are always lower case.
Before you start
- PvP must be allowed where the arena is. A world with PvP off, or a WorldGuard (or similar) region that denies PvP, stops every hit.
- Arenas must not overlap. Two overlapping arenas would undo each other's resets.
/pd doctorreports overlaps. - The arena's world must be loaded when the server starts, so that leftover changes from a crash can be put back. If your worlds come from a world-management plugin, make sure it loads this world at startup.
- Build the arena closed in. The bounds act as invisible walls, but a real floor and walls look better and stop players from falling out by accident.
Create an arena
/pd arena create <arena>Set the bounds
Stand in a corner and use the two corner commands:
| Command | What it does |
|---|---|
/pd arena pos1 <arena> | First corner. The block under your feet is included, so stand on the floor. |
/pd arena pos2 <arena> | Opposite corner. Stand (or fly) at the highest point players should reach. |
Both corners must be in the same world. After the second corner, PandaDuels prints the size in blocks.
You can also type exact coordinates, which works from the console:
/pd arena bounds <arena> <world> <x1> <y1> <z1> <x2> <y2> <z2>Leave room above the floor. Players can't move above the top of the box, and in build kits they can place blocks up to build-height blocks above the lowest spawn (20 by default). Make the box taller than that.
Add spawns
/pd arena spawn <arena> <team number>This adds a spawn for that team where you stand, facing the way you face. Run it once for team 1 and once for team 2. You can also give a location: /pd arena spawn <arena> <team> <world> <x> <y> <z> [yaw] [pitch].
Every spawn must be inside the bounds. A spawn outside them puts the player out as soon as the round starts.
You can add several spawns to the same team. How spawns are used:
| Match | Spawns used |
|---|---|
| 1v1 and team matches | Team 1's spawns for the first team, team 2's spawns for the second. Players in a team take that team's spawns in turn. |
| Party free for all, or more teams than the arena has team numbers | All spawns of every team, in turn. |
| A team number with no spawns | All spawns, in turn. |
If more players share a team than there are spawns, they share spawn points. For party matches, add three or four spawns per team.
To remove spawns: /pd arena clearspawns <arena> clears all of them, and /pd arena clearspawns <arena> <team> clears one team.
The floor
PandaDuels treats the lowest spawn's height as the arena floor. Two things are measured from it:
- Build height: in build kits, blocks can't be placed higher than
build-heightblocks above the floor. - Falling out: in sumo kits a player is out when more than 1 block below the floor. In spleef, TNT run and
void_outkits, more than 2 blocks below.
In every kit, falling below the bottom of the bounds is out.
Set the spectator spawn
/pd arena spectator <arena>Spectators and eliminated players are sent here. Without one, they go 3 blocks above the first spawn. Keep it within 24 blocks of the arena: spectators can't move further than 24 blocks from the bounds, and /pd doctor warns if the spawn is too far.
Turn it on
/pd arena enable <arena>If the arena isn't ready, PandaDuels lists what is missing instead. /pd arena disable <arena> takes it out of use.
Limit an arena to certain kits
/pd arena kits <arena> <kit> [kit ...]Only the listed kits use this arena. To allow any kit again:
/pd arena kits <arena> anyUse this to keep build kits in build arenas and sumo kits on sumo platforms. /pd doctor warns about a kit that has no ready arena, and about an arena that lists a kit that doesn't exist.
Other arena commands
| Command | What it does |
|---|---|
/pd arena list | All arenas, whether they're on, and their state: free, in_use or resetting. |
/pd arena info <arena> | Bounds, spawns, kits and anything that stops the arena from being used. |
/pd arena name <arena> <display name> | The name players see in "Match found ... on ...". |
/pd arena tp <arena> | Teleports you to the arena's first spawn. |
/pd arena delete <arena> | Deletes the arena. |
Changes (everything except info and tp) are refused while the arena is in a match or resetting. Try again when it shows as free.
How matches pick an arena
When a match is ready to start, PandaDuels picks a random arena that is on, free, ready and allowed for the kit. If none is free, the players are told All arenas for <kit> are in use and the match starts as soon as one frees up. Add more arenas to run more matches at once.
How resets work
During a match, PandaDuels records the first state of every block that changes in the arena: placed and broken blocks, explosions, fluids, fire, pistons, and blocks TNT run removes. Each new position is also written straight away to plugins/PandaDuels/journals/<arena>.journal.
When the match ends:
- Every recorded block is put back exactly as it was.
- Anything that appeared inside the arena during the match is removed: items, arrows, end crystals, TNT, mobs and so on.
- Dropped items, experience orbs, projectiles, TNT, falling blocks, end crystals and effect clouds up to 8 blocks outside the walls are removed too.
- The journal file is deleted and the arena is marked free.
An arena is not given to a new match until its reset has finished. Between rounds of the same match, the same reset runs but the arena stays reserved for that match.
Crash repair
If the server stops during a match, the journal file is still on disk. At the next start, PandaDuels puts those blocks back before the arena can be used, and logs Arena <arena>: the server stopped during a match; putting N blocks back.
If the arena's world isn't loaded at that start, the journal is kept and the arena stays out of use until a start where the world is loaded.
Protection outside matches
When an arena is not in a match:
- Only players with
pandaduels.admincan place or break blocks, or use buckets, inside it. Everyone else is blocked. - Fire spread, leaf decay, crop growth, ice and snow forming, fluids flowing in or out, and pistons reaching across the walls are stopped.
While an arena is in a match or resetting:
- Staff can't edit it either. Wait until
/pd arena listshows it asfree. - Players without
pandaduels.admincan't teleport into it, and can't open containers in it.
Known limits
- Resets restore blocks, not container contents. A chest, barrel or other container that is broken or replaced during a match comes back empty. Players in a match can't open containers in the arena unless you set
match.allow-containers: true, and items they put into a container are not removed by the reset. - Arenas must not overlap.
- The arena world must be loaded when the server starts.