Once new players start arriving on your server, the first problem tends to be the same one: someone breaks the builds at spawn, someone's chests get emptied, or a shared market square ends up flooded with lava. You can undo the damage afterwards, as our guide to rolling back griefing with CoreProtect explains, but it is far better if the damage never happens. That is exactly what WorldGuard is for. You select an area of the world, give it a name, and decide with simple rules who may do what inside it.

Installation: WorldGuard needs a partner

WorldGuard leaves the job of selecting areas to another plugin, WorldEdit, so the two always go together. If you run software from the plugin family (Paper, Purpur, Spigot), you can install both from the panel or upload them to the plugins folder with the file manager. Pick versions that match your server's Minecraft version and each other. Restart the server afterwards. When the console shows both plugins loading without errors, you are ready.

Whoever manages regions needs permission to do so. Doing it as an OP is fine at first; once you have a team, splitting the permissions into groups as described in ranks and permissions with LuckPerms is the safer route.

What a region is and how to select one

In WorldGuard a region is a volume of the world with fixed boundaries. The moment you create one, a sensible default kicks in: players who are neither members nor owners of the region cannot break blocks, place blocks or use most things there. In other words, simply defining a region already gives you basic protection.

You select the area with WorldEdit's selection tool:

  1. Run //wand to get the selection tool, a wooden axe.
  2. Left-click a block at one corner of the area you want to protect. That is your first point.
  3. Right-click a block at the opposite corner. That is your second point. You can also mark the spot you are standing on with //pos1 and //pos2.
  4. The selection only covers the height between your two points. If the area should be protected from bedrock to sky, run //expand vert and the selection stretches to the bottom and top of the world.
  5. Create the region: /rg define spawn

/rg is simply short for /region; both do the same thing. Keep region names lowercase and free of spaces, such as spawn, market or alex-house.

Protecting spawn

Vanilla Minecraft already has a setting in server.properties called spawn-protection. It stops non-operators from changing blocks within a certain radius of the spawn point. It is blunt: a plain square with no fine control. If you are going to use WorldGuard, setting this value to 0 and leaving protection entirely to WorldGuard keeps the two systems from getting in each other's way.

Once you have defined the spawn area as spawn using the steps above, you fine-tune it with flags. A typical spawn region looks like this:

/rg flag spawn pvp deny
/rg flag spawn mob-spawning deny
/rg flag spawn tnt deny
/rg flag spawn creeper-explosion deny
/rg flag spawn fire-spread deny
/rg flag spawn greeting &aWelcome to the server!

Now nobody can fight at spawn, no mobs appear, explosions and fire do no harm, and newcomers see a greeting.

Flags: the rules of a region

A flag is a rule that switches one particular behaviour on or off inside a region. The general form is /rg flag <region> <flag> <value>. To remove a flag and fall back to the default, leave the value out: /rg flag spawn pvp. The ones you will use most often:

FlagWhat it controls buildBreaking and placing blocks in general. Set to deny, it stops members too. pvpWhether players can damage each other. chest-accessOpening chests, barrels and other storage blocks. useUsing doors, buttons, levers and the like. mob-spawningWhether mobs spawn in the region. entry / exitBlocking players from entering or leaving. greeting / farewellThe message shown on entering and leaving.

To apply a flag only to a certain set of players, use the -g option. If, say, only members should be able to walk into an arena: /rg flag arena -g nonmembers entry deny. Here nonmembers means anyone who is not a member or owner; members, owners and all are also available.

One thing worth remembering: build deny stops members as well. If all you want is to keep strangers from building, leave that flag alone, because the default protection already does exactly that.

Adding members and owners

A region has two kinds of trusted people. Members can build and use things inside it. Owners can do the same and can also manage the member list and, if they have the permission, the region's flags.

  • Add a member: /rg addmember alex-house Alex
  • Add an owner: /rg addowner alex-house Alex
  • Remove a member: /rg removemember alex-house Sam
  • Remove an owner: /rg removeowner alex-house Alex

Instead of individual players you can also add a whole permission group. /rg addmember market g:traders makes everyone in your permissions plugin's traders group a member of that region. Rights in the region then follow group membership automatically.

Nested regions and priority

Regions are allowed to overlap. A large town region can contain a plot for each player. When two regions overlap, priority decides whose rules apply, and the higher number wins:

/rg setpriority town 0
/rg setpriority alex-house 10

There is also a special, boundless region that covers the whole world: __global__. To stop fire spreading anywhere in the world, for instance, you can run /rg flag __global__ fire-spread deny. Be careful with build-related flags here, since one wrong setting can stop everyone building everywhere.

Inspecting and managing regions

  • /rg info shows the owners, members and flags of the region you are standing in. Give it a name to look up a specific one: /rg info spawn.
  • /rg list lists the regions in the current world.
  • /rg select spawn reselects a region's boundaries; you can then enlarge the selection and update the region with /rg redefine spawn.
  • /rg remove alex-house deletes a region. This only removes the protection and leaves the builds inside untouched.

Region data lives in the server folder at plugins/WorldGuard/worlds/<world name>/regions.yml. If you edit it by hand in the file manager, reload it with /rg load.

Common mistakes

  • Testing with an operator account. Operators can get past the protection. Check that a region works using a non-OP account that is not a member.
  • Forgetting to expand vertically. If you pick two points on the ground and define a region, players can tunnel in underneath or build in from above. Make //expand vert a habit.
  • Solving everything with __global__. Global rules affect the entire world, so only put rules there that truly belong everywhere.
  • Expecting builds to come back when you delete a region. WorldGuard prevents damage but does not reverse it. If damage has already happened, you need a logging plugin such as CoreProtect.

For how WorldGuard fits together with the other plugins on a survival server, see our guide to essential plugins for a survival server.