> For the complete documentation index, see [llms.txt](https://realisticnode.gitbook.io/rnsetups/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://realisticnode.gitbook.io/rnsetups/rncombatpvp/guides/safe-zones.md).

# Safe zones

WorldGuard regions players in combat can't enter, and the glass wall only they see.

A safe zone is any **WorldGuard** region with PvP off. Players in combat can't get into one, so they can't escape a fight by running to spawn. Without WorldGuard this page does nothing.

## Make a safe zone

Give the region the `pvp` flag `deny`:

```
/rg flag spawn pvp deny
```

That's all. When the server starts, the console says `WorldGuard found: regions with pvp deny are safe zones.`

## What players in combat can't do

With `safe-zones.block-entering: true` (default), a player in combat can't:

* walk into a safe zone (they are stopped at the edge and pushed back),
* throw an ender pearl or eat chorus fruit to land inside one,
* teleport into one.

They get "You can't enter a safe zone in combat (8s)" in the action bar. `safe-zones.push-back` sets how hard they are pushed (`0.7`; `0` = only stopped, up to `3`).

A player who was put in combat **inside** a safe zone can still walk out of it.

## The glass wall

<figure><img src="https://i.imgur.com/nTw76pi.png" alt="The red glass wall at the edge of a safe zone, seen by a player in combat"><figcaption><p>The red glass wall at the edge of a safe zone, seen by a player in combat</p></figcaption></figure>

With `safe-zones.wall: true` (default), a player in combat sees a wall of glass at the edge of the safe zones near them:

* **Only that player sees it.** The blocks are not really there: other players, mobs and the world are not changed.
* It is drawn `safe-zones.wall-radius` blocks around the player (6, from 2 to 12), from one block below their feet to three above, only where there is air or a block you can walk through.
* `safe-zones.wall-material` sets the block (`RED_STAINED_GLASS`).
* It follows the player as they move and goes away as soon as combat ends.
* It only shows when `block-entering` is on.

## Who can go in

Players with `rncombat.bypass.safezone` can enter safe zones while in combat, and don't see the wall.

{% hint style="info" %}
WorldGuard does not officially support Folia. If your WorldGuard build runs on Folia, safe zones use it the same way; if WorldGuard can't be used, the console says so and safe zones are off.
{% endhint %}
