> ## Documentation Index
> Fetch the complete documentation index at: https://hotpotato.arrowtan.cc/llms.txt
> Use this file to discover all available pages before exploring further.

# Arena bounds

> Box in an arena so players and spectators cannot leave the play area.

Spectators watch in spectator game mode, which lets them fly through walls, and a fast or knocked-back player can slip past the edge of the map too. Arena bounds draw an invisible box around the play area and keep everyone inside it. Spectators are sent back to the spectator spawn, and players still in the round are pushed or pulled back in.

## Set the bounds

<Steps>
  <Step title="Stand at the first corner">
    Move to one corner of the area you want to fence in, then run:

    ```
    /hotpotato arena setcorner1 <arena>
    ```
  </Step>

  <Step title="Stand at the opposite corner">
    Move to the diagonally opposite corner and run:

    ```
    /hotpotato arena setcorner2 <arena>
    ```
  </Step>

  <Step title="Save">
    Run `/hotpotato arena save <arena>` to confirm the box is complete.
  </Step>
</Steps>

The two corners define a box. Make it a bit larger than the arena so players have room and spectators can follow the action. Set the corners tall enough to cover the jump height of your powerups, or a high jumper gets nudged back down.

<Tip>
  Pick corners that are diagonally opposite, like the bottom of one wall and the top of the wall across from it. The box is built from the lowest and highest of each coordinate, so the order you set them in does not matter.
</Tip>

## How it behaves

* Bounds are optional. Set neither corner and nothing changes.
* A spectator who leaves the box is teleported back to the spectator spawn.
* A player still in the round is held inside the box once the round is live. The lobby and countdown are not affected.
* A walking player who crosses the edge gets a gentle shove back in. A player flying out in creative or spectator is teleported back to the edge instead, since a shove cannot hold a flier.
* The check runs constantly, so anyone can only drift a little before they snap back.

## Settings

Two settings under `defaults` in `config.yml` tune how players are held, and both apply on `/hotpotato reload`.

`bounds-push-strength` sets how hard a walking player is shoved back in. Raise it for a firmer wall.

`bounds-allow-creative-escape` is off by default, so a player flying out in creative or spectator is pulled back in too. Turn it on to let admins fly out of the box during a round.

## Set both or neither

<Warning>
  If you set just one corner, the arena is marked as not playable until you fix it. Set the other corner, or clear both, and it becomes playable again. The save message tells you when only one corner is set.
</Warning>
