Arena Instances

Make extra copies of only your busy duel arenas in their own world, and let the plugin add more copies when players need them.

Off by default
arenas.instances.enabled and arenas.instances.auto-expand.enabled are both false, and no arenas are picked. Nothing changes until you turn it on.

How It Works

  1. You make a normal duel arena, for example Grass. This is the template.
  2. You add Grass to arenas.instances.templates.
  3. On start, the plugin pastes copies of Grass in a separate empty world, with space between them. Each copy gets the spawns, center, kits, build setting and gates.
  4. A copy is only used for matches after it is fully pasted and checked.
  5. After a match, the copy is reset and used again. With auto expand on, more copies are made when free copies run low.

One copy is one match at a time. A team match also uses one copy.

Once copies of a template are ready, the template itself (and its clone world copies) is no longer used for matches. Keep it as the arena you edit. Arenas that are not picked, and FFA arenas, work as before.

Instances or Cloning?

SystemWhat it copiesUse it for
Normal arenasNothing. Each arena is one match slot.Small servers.
arenas.cloningThe whole Arenas world, a set number of times.A fixed number of copies of every arena.
arenas.instancesOnly the arenas you pick, into one world.More copies of busy arenas only, and growing when needed.

Both can be on at once. Picked templates are skipped by cloning.

What a Template Needs

Set up the arena with Arena Setup first.

Settings

These go inside the arenas: section of config.yml.

arenas:
  instances:
    enabled: false
    world: ShyamDuelsInstances
    templates: []
    initial-copies: 2
    max-copies-per-template: 8
    max-total-copies: 128
    spacing-blocks: 64
    max-concurrent-preparations: 1
    auto-expand:
      enabled: false
      minimum-ready: 1
    overrides: {}
SettingDefaultWhat it does
enabledfalseTurns instances on. Needs a restart.
worldShyamDuelsInstancesName of the world for copies. Needs a restart.
templates[]Arena names to copy. Empty means none. Needs a restart.
initial-copies2Copies of each template made on start. Copies that already exist count.
max-copies-per-template8Most copies of one template.
max-total-copies128Most copies in total. Failed and retired copies still count.
spacing-blocks64Space between copies. Needs a restart.
max-concurrent-preparations1Copies pasted at the same time. Normal arena resets go first.
auto-expand.enabledfalseMakes more copies when free copies run low.
auto-expand.minimum-ready1Free copies to keep for each template.
overrides{}Different limits for one template.

Turn It On

  1. Stop the server and make a backup.
  2. Change the settings like this, with your own arena name:
    arenas:
      instances:
        enabled: true
        world: ShyamDuelsInstances
        templates:
          - Grass
        initial-copies: 2
        max-copies-per-template: 4
        max-total-copies: 8
  3. Start the server. Read the [ArenaInstances] lines in the console.
  4. Run /arena instances status Grass to see how many copies are ready.
  5. Play a test duel. Add more copies only after you see how long they take and how the server runs.

With auto expand off, you can still add a copy by hand: /arena instances prepare Grass 1.

Auto Expand

Set auto-expand.enabled: true and run /sd reload-config confirm. When the free copies of a template drop below minimum-ready, a new copy is made, as long as the limits allow it.

Not instant
Making a copy takes time. If all copies are busy and the limits are reached, players can still see that no arena is free. Copies are kept and used again. They are never removed when idle.

Limits for one template

overrides:
  Grass:
    initial-copies: 2
    max-copies: 6
    minimum-ready: 1

The template must also be in templates.

Commands

Permission: shyamduels.admin. They also work from the console. A slot is the number of a copy, shown in status.

CommandWhat it does
/arena instances status [template]Shows limits and copy counts. Name a template to see only that one.
/arena instances slot <slot>Shows one copy: state, name, time to prepare and the last error.
/arena instances prepare <template> [count]Asks for more copies.
/arena instances retry <slot>Tries a failed copy again. Fix the cause first.
/arena instances refresh <template>Updates idle copies after you saved the template again.
/arena instances resumeStarts the system again after it paused, if that is safe.

Copy states

StateMeaning
QUEUEDWaiting to be pasted.
PREPARINGBeing pasted and checked.
READYFree for a match.
IN_USEA match is running.
RESETTINGBlocks are being put back.
FAILEDNot used. Check the error, then retry.
RETIREDRemoved from use. Its space stays reserved.

Editing a Template

Restart or Reload?

ChangeWhat to do
Turn on or off, change world, templates or spacingRestart.
Change limits, minimum-ready, preparations or auto expand/sd reload-config confirm. Lower limits stop new copies but do not remove copies.
Turn it offSet enabled: false and restart. The world files are kept.

Backups and Safety Files

Back up the template arenas, the schematics and the whole instance world folder, including hidden files:

Do not delete these files
The plugin will not use a world folder that it did not make, even an empty one. Never delete or edit the safety files to get past an error. Restore a backup or pick a new world name.

After a restart, copies are pasted again before they are used. /arena delete <copy name> retires an idle copy. To stop using a template, remove it from templates and restart before you delete the arena.

Performance Tips

If Something Is Wrong

  1. Run /arena instances status <template> and check it is on and not paused.
  2. Run /arena instances slot <slot> on a failed copy and read the error and the [ArenaInstances] console lines.
  3. Check the template: arena name, duel type, corners, spawns, kits, build setting and saved build.
  4. Fix the cause, then use retry or resume.

See also Troubleshooting.