MINECRAFTHUB.IO
Beginner

How to Use WorldGuard to Protect Areas on a Server

A step-by-step route from a WorldEdit selection to a protected region, with owners, members, priority and ready-to-use flag recipes for spawn, PvP and open areas.

MinecraftHub editorial cover showing a gold chest inside a lime-bordered protected zone, with a red crossed-out block outside and a tick above the zone

Published

To use WorldGuard, select an area with WorldEdit, turn it into a named region with `/region define`, then add members and set flags. A new region blocks building by default, so protection starts the moment you define it. WorldGuard is a Java plugin for Bukkit-type servers such as Paper or Spigot, and it does not run on Bedrock.

What WorldGuard does and what you need first

WorldGuard guards areas of land against griefers and lets you switch off or tweak gameplay rules inside them, such as PvP, TNT and mob damage. Everything is off by default, so installing it changes nothing until you create regions.

  • A Java server running Paper or Spigot. The latest release, 7.0.19, lists Bukkit, Paper, Spigot and Folia builds. Players install nothing and join with a normal client.
  • WorldEdit in the same plugins folder. WorldGuard uses it to read your selection, and older WorldGuard releases list it as a required dependency.
  • Operator status or permissions from a permissions plugin. Only opped users or users with granted permissions can use WorldGuard. A guide to LuckPerms covers the permissions side.

If you have not installed a plugin before, follow how to install plugins on a server first, then restart the server.

Select an area with WorldEdit

A region needs a physical area, and WorldEdit supplies it. Regions can be cuboids (a box) or 2D polygons with heights. If you try an unsupported shape such as a cylinder, WorldGuard tells you so. Making the selection itself is a WorldEdit skill, covered in how to use WorldEdit.

Trade-off worth knowing early. Only cuboids and 2D polygons with heights are supported, so plan your area around those two shapes.

Define a region and set its priority

With your selection active, create the region. Every region needs a unique name, and names are case-insensitive.

  1. 1.Run `/region define town`. You can also type `/rg define town`, since `/rg` is a shortcut.
  2. 2.Check it with `/rg info town`. Use `/rg list` to see all regions.
  3. 3.If the shape is wrong, select a new area and run `/rg redefine town` to change the shape or size.
  4. 4.To delete a region, run `/rg remove town`.

Changes save automatically after a short delay. To force it, run `/rg save`. Saves happen in the background and do not pause the server.

Handling overlap with priority

Regions can overlap, which is flexible and also the main source of confusion. Where regions overlap, a player must have permission to build in all of them. To make one region override another, use priorities and region inheritance.

Add owners and members

Since a new region blocks building for everyone, you now decide who is let in. Owners and members can be players or permission groups. Prefix a group name with `g:`. The reason to keep the two roles separate is that command permissions can be set separately for owners and members.

  • `/rg addmember town wizjany sk89q g:builders` adds two players and the group builders as members.
  • `/rg addowner town sk89q` adds an owner.
  • `/rg removemember town g:builders` and `/rg removeowner town sk89q` take them away again.
  • `/rg define town wizjany sk89q g:builders` names owners at the moment you create the region.

Set flags to control what happens in a region

Flags are extra settings on a region. The pattern is `/rg flag <region> <flag> <value>`. For example, `/rg flag town pvp deny` blocks PvP. Most flags take `allow` or `deny`, and `none` clears the value again.

  • `pvp` allows or blocks player fighting.
  • `mob-spawning` and `mob-damage` control mobs in the region.
  • `creeper-explosion` and `tnt` control explosion damage.
  • `use` covers buttons, doors and similar blocks. `chest-access` covers chests.
  • `greeting` and `farewell` send text when players enter or leave. `%name%` in a greeting shows the player's name.

Some flags take a group. The entry flag with `-g nonowners`, as in `/region flag dom entry -g nonowners deny`, keeps out everyone who is not an owner. The full list is in the WorldGuard region flags documentation.

Common flag recipes for spawn, PvP and build areas

A safe spawn

Define a region called `spawn`, then run `/rg flag spawn pvp deny`, `/rg flag spawn tnt deny` and `/rg flag spawn mob-spawning deny`. Add `/rg flag spawn greeting Welcome, %name%.` for a message on entry. Players cannot alter the area unless you make them members.

A no-PvP zone that does not protect blocks

Set `/rg flag market passthrough allow`, then `/rg flag market pvp deny`. The passthrough flag stops the region from acting as a block-protection area, so it only applies your other flags.

A protected area with usable doors

The official Common Scenarios page explains how to allow the use of doors, levers, pressure plates and similar blocks, and lists more recipes of this kind.

Frequently asked questions

Does WorldGuard work on Bedrock?

No. WorldGuard is a Java plugin for Bukkit-type servers such as Spigot and Paper. The creators say to make sure you are using the Java side of the game. WorldEdit, which WorldGuard relies on for selections, also does not support Bedrock.

Do I need WorldEdit to use WorldGuard?

In practice, yes. WorldGuard reads the area you select with WorldEdit when you create a region. The creators' install steps put both plugins in the plugins folder, and most WorldGuard releases list WorldEdit as a required dependency.

Why can nobody build in my new region?

A newly created region automatically prevents building inside it. Add the players or a permission group as members with `/rg addmember`, or as owners with `/rg addowner`. If regions overlap, a player needs permission in every overlapping region, so check priority too.

Who can use WorldGuard commands?

Only opped users or users given permissions by a permissions plugin. Players who join the server need nothing installed. Region commands each have their own permission, so you can let trusted players manage only their own regions.

How do I stop PvP in an area?

Run `/rg flag <region> pvp deny` on the region covering that area. If the region should not protect blocks, first set the `passthrough` flag to allow, so only your chosen flags apply.

Resources mentioned.

Related guides.