Offer Why us? How it works?
Guide

How to Install WorldGuard: Regions, Flags and Commands

WorldGuard is the plugin servers use to protect spawn, shops and builds from griefing, and to switch off PvP, mobs or explosions in chosen areas. This guide shows how to install it together with WorldEdit, create your first region, use the most useful flags, give players access and handle overlapping regions. At the end you'll find GriefPrevention, the alternative that lets players protect their own land.

Updated: 11 min read
Table of contents
  1. What is WorldGuard?
  2. What do you need to run WorldGuard?
  3. How to install WorldGuard on a Spot.gg server
  4. How to create a WorldGuard region
  5. The most important WorldGuard commands
  6. WorldGuard flags: pvp, build, mob-spawning and more
  7. Setting flags for a group of players
  8. A protected spawn in four commands
  9. How to add members and owners to a region
  10. How do region priorities work?
  11. The global region: rules for the whole world
  12. WorldGuard not working? Common problems
  13. GriefPrevention: the alternative for player claims
  14. FAQ
  15. Does WorldGuard need WorldEdit?
  16. How do I protect spawn with WorldGuard?
  17. How do I turn off PvP in WorldGuard?
  18. Why can I still break blocks in my region?
  19. Is WorldGuard free?
  20. What's better, WorldGuard or GriefPrevention?
  21. Does WorldGuard work on Fabric or Forge?

What is WorldGuard?

WorldGuard is a free plugin for Paper, Purpur and Spigot servers that protects areas of your world, called regions, and changes the rules inside them with flags – for example no building for strangers, no PvP or no mob spawning. It's made by EngineHub, the same team as WorldEdit.

Typical uses:

Region What you set
Spawn Nobody but staff can build; no PvP; no hostile mobs; no explosions
Shop or market Shop owners can build, everyone can open doors and use buttons
PvP arena PvP on, building off
A player's base Only that player (and friends) can build and open chests
The whole world Global rules, e.g. PvP off everywhere

WorldGuard is an admin tool: staff create the regions with commands. If you want players to protect their own land themselves, look at GriefPrevention in the last section of this guide.

What do you need to run WorldGuard?

A Paper, Purpur or Spigot server with WorldEdit (or FastAsyncWorldEdit) installed – WorldGuard won't load without it. WorldGuard uses WorldEdit's selection tool to mark where a region begins and ends.

Plugin Why
WorldGuard The protection plugin
WorldEdit or FastAsyncWorldEdit Required: selections for regions (install only one of the two)
LuckPerms Optional: lets staff use WorldGuard commands without being OP

WorldGuard doesn't run on Vanilla, Fabric, Forge or NeoForge. If you're new to plugins, how to install Minecraft plugins explains the basics.

How to install WorldGuard on a Spot.gg server

In "Addons" → "Available to install", install WorldEdit first and then WorldGuard, each with the file marked "Compatible with your server", and restart the server.

  1. Use Paper or Purpur. On Vanilla, go to "Information" → "Profile" → "Modify" → "Change engine" and pick Paper on the same Minecraft version – your world stays.
  2. Open "Addons" → "Available to install", search for WorldEdit and install the file marked "Compatible with your server".
  3. Search for WorldGuard and install it the same way.
  4. When the panel asks "Restart required", click "Restart". WorldGuard creates plugins/WorldGuard/ with its config and region files.
  5. Give yourself OP: in "Console" type op YourName (no slash in the console).

On your own server it's the same: put both jars in the plugins folder and restart. Type /plugins in the game – WorldEdit and WorldGuard should both be green.

Turn off Vanilla spawn protection. server.properties has spawn-protection=16 by default, which stops everyone who isn't OP from building near spawn, even where WorldGuard allows it. Once WorldGuard protects your spawn, set it to 0 – on Spot.gg under "Configuration" → "server.properties", then restart.

How to create a WorldGuard region

Select the area with the WorldEdit wand, then type /rg define <name> – that's it, the region is protected. Players who aren't members of the region can no longer build or break blocks in it.

  1. Get the wand: type //wand. You get a wooden axe.
  2. Mark two opposite corners: left-click one corner block, right-click the opposite corner block. WorldEdit confirms both positions in chat.
  3. Make it full height: type //expand vert. Without this, the region only covers the height between your two clicks, and players could still build above or dig below it.
  4. Create the region: /rg define spawn

Region names must be unique in the world and aren't case-sensitive. You can name owners right away: /rg define base Steve Alex.

The wand and selections are explained in more detail in how to use WorldEdit.

Test it with a normal account. As an OP you bypass region protection (everything except PvP deny flags), so you'll still be able to build everywhere. Type /rg bypass to toggle that off while you test, or ask a friend to try.

The most important WorldGuard commands

The commands you'll use most are /rg define, /rg flag, /rg addmember, /rg info and /rg remove. /rg is short for /region; both work.

Command What it does
/rg define <name> Creates a region from your current selection
/rg redefine <name> Changes an existing region to your new selection
/rg info [name] Shows the region you're standing in (or the named one): owners, members, flags, priority
/rg list Lists the regions in this world
/rg select <name> Selects an existing region with WorldEdit, e.g. to see or change its size
/rg flag <name> <flag> <value> Sets a flag
/rg flags <name> Shows all flags of a region as a clickable list
/rg addmember <name> <player> Adds a member
/rg addowner <name> <player> Adds an owner
/rg removemember <name> <player> Removes a member (removeowner for owners)
/rg setpriority <name> <number> Sets the priority for overlapping regions
/rg teleport <name> Teleports you to the region
/rg remove <name> Deletes the region
/rg bypass Turns your own bypass on or off

WorldGuard flags: pvp, build, mob-spawning and more

Flags change the rules inside a region: /rg flag <region> <flag> <value>, where the value is usually allow or deny. For example /rg flag spawn pvp deny turns PvP off at spawn. To remove a flag again, leave out the value: /rg flag spawn pvp.

Flag What it controls Example
build Building, breaking and most interactions for non-members /rg flag arena build deny
pvp Player-versus-player combat /rg flag spawn pvp deny
mob-spawning Whether mobs can spawn /rg flag spawn mob-spawning deny
deny-spawn Only the listed mob types can't spawn /rg flag spawn deny-spawn zombie,creeper
creeper-explosion Creeper explosions damaging blocks /rg flag spawn creeper-explosion deny
tnt TNT explosions /rg flag spawn tnt deny
use Doors, buttons, levers, pressure plates /rg flag spawn use allow
chest-access Opening chests and other containers /rg flag shop chest-access deny
interact Using blocks and entities in general /rg flag spawn interact allow
entry / exit Whether players can enter or leave /rg flag vault entry deny
greeting / farewell Chat message on entering / leaving /rg flag spawn greeting Welcome to spawn!
item-drop Dropping items /rg flag lobby item-drop deny
invincible Players can't take damage /rg flag lobby invincible allow
fire-spread, lava-fire Fire spreading, lava starting fires /rg flag spawn fire-spread deny

fire-spread and lava-fire only work when the "high frequency flags" option is turned on in WorldGuard's config, because checking them costs performance.

Setting flags for a group of players

Add -g and a group to apply a flag only to some players: all, members, owners, nonmembers or nonowners.

/rg flag vault entry -g nonmembers deny

This keeps everyone except the region's members out of the vault. One flag can only have one value per region, so you can't give the same flag different values for two groups.

A protected spawn in four commands

/rg define spawn
/rg flag spawn pvp deny
/rg flag spawn mob-spawning deny
/rg flag spawn use allow

The region already blocks building for non-members. use allow lets everyone open doors and press buttons, which a protected region otherwise blocks too.

How to add members and owners to a region

Members can build in a region; owners can also manage it. Add them with /rg addmember and /rg addowner:

/rg addmember base Alex
/rg addowner base Steve

You can also add a whole permission group by putting g: before its name, for example /rg addmember spawn g:builders gives every player in the LuckPerms group "builders" building rights at spawn. Groups are set up in how to set up LuckPerms.

Commands for staff without OP: WorldGuard's permissions start with worldguard.region., for example worldguard.region.define or worldguard.region.info.*, and worldguard.* gives full access. Give them to a staff group with LuckPerms – and keep in mind that full access includes the bypass, so those players can build in every region too.

How do region priorities work?

When regions overlap, the one with the higher priority wins; every region starts at priority 0. Set it with /rg setpriority <name> <number>.

Example: a shop inside your spawn region. Both have priority 0, so a shop owner would also need to be a member of spawn to build. Give the shop a higher priority:

/rg define shop1
/rg addmember shop1 Alex
/rg setpriority shop1 10

Now only the shop's member list counts inside it, and Alex can build in his shop but not in the rest of spawn. For flags, WorldGuard uses the highest-priority region that has that flag set – so a pvp deny at spawn still applies inside the shop unless the shop sets its own pvp value.

Regions can also inherit settings from a parent: /rg setparent shop1 spawn.

The global region: rules for the whole world

__global__ is a special region that covers an entire world, and you use it to set world-wide flags such as /rg flag __global__ pvp deny. Each world (overworld, Nether, End) has its own.

  • World-wide rules: /rg flag __global__ pvp deny, /rg flag __global__ creeper-explosion deny.
  • Protect the whole world by default: /rg flag __global__ passthrough deny. After that only members of the global region can build anywhere outside other regions – useful for creative build servers.
  • Don't set build on __global__. It stops everything from placing or breaking blocks, including pistons, and WorldGuard's documentation strongly advises against it. Use passthrough deny instead.

WorldGuard not working? Common problems

Problem Cause Fix
WorldGuard is red in /plugins WorldEdit is missing or the wrong version Install WorldEdit for your Minecraft version, restart
You can still build in the region You're OP and bypass protection Test with a normal account or toggle /rg bypass
Players can't build anywhere near spawn Vanilla spawn-protection Set spawn-protection=0 in server.properties
Players build above or below the region The selection wasn't full height /rg select <name>, //expand vert, /rg redefine <name>
Players can't open doors at spawn Protected regions block use for non-members /rg flag spawn use allow
A flag does nothing Another region with a higher priority overrides it Check /rg info at that spot and the priorities

GriefPrevention: the alternative for player claims

GriefPrevention lets players protect their own land: they mark a claim with a golden shovel and then decide who can build or open chests there – no admin needed. It's a better fit than WorldGuard for survival servers where every player builds a base. Many servers use both: WorldGuard for spawn, GriefPrevention for players.

WorldGuard GriefPrevention
Who creates protected areas Admins, with commands Players, with a golden shovel
Best for Spawn, shops, arenas, world rules Players' bases on a survival server
Needs WorldEdit Yes No
Height Region height (use //expand vert) Claims always reach the max build height

How it works with the default settings:

  • First chest: new players get an automatic small claim around the first chest they place.
  • Golden shovel: right-click one corner of the land, then the opposite corner – that's a claim. A claim has to be at least 5 blocks wide with an area of at least 100 blocks.
  • Stick: right-click with a stick to see claim borders around you.
  • Claim blocks: every player starts with 100 claim blocks and earns 100 more per hour of play, up to 80,000 earned this way. Idling doesn't count.
Command What it does
/trust <player> Lets a player build in your claim
/containertrust <player> Chests, crops, animals, beds, buttons and levers
/accesstrust <player> Only beds, buttons and levers
/permissiontrust <player> Lets a player share their access with others
/untrust <player> Removes access
/trustlist Shows who has access to the claim you're in
/claim <radius> Creates a claim around you without a shovel
/extendclaim <blocks> Pushes the claim border in the direction you're facing
/abandonclaim Deletes the claim you're standing in
/subdivideclaims Shovel mode for sub-claims, e.g. a shared shop inside a town

GriefPrevention is in our catalog: on Spot.gg install it from "Addons" → "Available to install" like any other plugin and restart.

FAQ

Does WorldGuard need WorldEdit?

Yes. WorldGuard won't load without WorldEdit (or FastAsyncWorldEdit), because it uses WorldEdit's selections to define regions.

How do I protect spawn with WorldGuard?

Select the spawn area with //wand, run //expand vert, then /rg define spawn. Add flags like /rg flag spawn pvp deny and /rg flag spawn mob-spawning deny.

How do I turn off PvP in WorldGuard?

In one region: /rg flag <region> pvp deny. In the whole world: /rg flag __global__ pvp deny.

Why can I still break blocks in my region?

Because you're OP, and operators bypass region protection. Use /rg bypass to turn the bypass off, or test with an account that isn't OP.

Is WorldGuard free?

Yes. WorldGuard is free and open source. On Spot.gg you install it from the "Addons" tab at no extra cost.

What's better, WorldGuard or GriefPrevention?

They do different jobs. WorldGuard is for admins protecting spawn and special areas; GriefPrevention is for players protecting their own bases. Many survival servers use both.

Does WorldGuard work on Fabric or Forge?

No. WorldGuard is a plugin for Paper, Purpur and Spigot. Fabric and Forge servers need a protection mod instead.

Other guides