Arenas
How Duels builds an arena world for every match, generates vanilla terrain arenas, and how to limit maps to certain kits.
How arenas work
Every match gets its own copy of a map. The game server loads the map's saved world, plays the match in it and removes it when the match ends. Maps and their worlds are stored in MongoDB, so every game server can host every map.
Vanilla terrain arenas
Duels makes its own arenas from generated vanilla terrain. As soon as any enabled kit has the VanillaTerrain flag, a game server generates five maps:
| Map id | Biome |
|---|---|
vanilla_plains | Plains |
vanilla_savanna | Savanna |
vanilla_desert | Desert |
vanilla_snowy_plains | Snowy plains |
vanilla_meadow | Meadow |
Only one game server generates at a time, and only while it has no match running. Game servers check 10 seconds after startup and then every 5 minutes, so the arenas appear without a restart. If a biome fails to generate, the server tries up to five seeds and then tries again on the next check.
Turn it on for a kit:
/kit features add nodebuff VanillaTerrainThe flag's border setting is the width of the world border around the arena, in blocks. It is 100 by default:
/kit features metadata add nodebuff VanillaTerrain border 60Which map a match uses
When a match starts, the game server picks a random map from the ones that fit the kit:
- A map with an empty kit list can be used by any kit. A map with a kit list can only be used by the kits on it.
- A map that lists the kit by id is always allowed.
- Otherwise, a kit with
VanillaTerrainonly uses vanilla maps, and a kit without it only uses non-vanilla maps.
So a kit without VanillaTerrain can still play on a vanilla arena if you add its id to that map's kit list. If no map fits, the players are told there is no map for that kit and stay in the lobby.
Manage maps
Open /duels maps on the lobby to see every map, its kits and its spawn count. Click a map to change its display name, icon or kit list, or to delete it. In the kit list prompt, enter kit ids separated by commas, or none to allow every kit. This needs duels.admin.
The same changes can be made with Scaffold's /map commands on any server. They need scaffold.admin.
| Command | What it does |
|---|---|
/map list | Lists every map with its display name, icon and kits. |
/map info <map> | Shows everything stored about a map. |
/map displayname <map> <name> | Sets the display name. |
/map icon <map> <material> | Sets the menu icon. |
/map groups <map> | Shows the map's kit list. |
/map groups <map> <kit> | Adds the kit to the list, or removes it if it is already there. |
Deleted vanilla maps come back on the next check while a kit still uses VanillaTerrain.