Lodehost logoLodehost

World and settings

How to protect spawn with WorldGuard regions and flags

WorldGuard draws invisible boxes around parts of your world and sets the rules inside them. Spawn where only the build team can break blocks, an arena where PvP is on, a vault nobody else can walk into. This guide builds a protected spawn first, then the flags and overlaps most servers end up needing.

8 min read

Configure your serverPick a plan and order your server.
A small stone spawn plaza inside a glowing box outline, with a shield on a post
A region is a box in the world with its own rules. Inside this one, only the build team can change blocks.

Install WorldGuard and WorldEdit

WorldGuard is a plugin for Paper, Purpur, Spigot and Folia. It does not run on Fabric, Forge or NeoForge. It needs WorldEdit to start, because regions are drawn with a WorldEdit selection. FastAsyncWorldEdit counts as WorldEdit: it announces itself under that name and loads before WorldGuard, so either one works. Never install both.

Your server runsWhat the Plugins tab offers
26.2WorldGuard and FastAsyncWorldEdit, both checked by us for this version
26.3WorldGuard, WorldEdit and FastAsyncWorldEdit, the stable releases made for 26.3
  1. Install both from the catalog

    On the Plugins tab, search worldguard and press Install, then search worldedit and install WorldEdit or FastAsyncWorldEdit.

  2. Restart

    Restart the server from the Console tab. WorldGuard creates plugins/WorldGuard with a config.yml and a folder per world.

  3. Check the console

    If WorldGuard is missing from the plugin list after the start, the console usually says it is missing its WorldEdit dependency. Plugin not loading explains that message.

Operators walk through every region

An operator has every WorldGuard permission, including the bypass for region protection. So when you test a region on your own opped account, you can still break everything and it looks as if WorldGuard does nothing. Type /rg bypass off to switch your bypass off while testing, and /rg bypass on to get it back, or test on an account without op.

Create a region to protect spawn

These commands run in the game, because a region takes its shape from your own WorldEdit selection. Stand at spawn with the build team's area in view.

  1. Select the area

    Type //wand to get a wooden axe. Left click one corner of spawn and right click the opposite corner. A region can be a box or a flat outline with a height; spheres and cylinders are not accepted.

  2. Stretch it from bottom to top

    Type //expand vert. Without it the region is only as tall as the two blocks you clicked, and players can dig in from below or build on top. The WorldEdit guide has the other selection commands.

  3. Define the region

    Type /rg define spawn. From that moment nobody can build inside except its members and owners. Names are unique per world and not case sensitive.

  4. Let the build team in

    /rg addmember spawn RiverFox22 adds one player. /rg addmember spawn g:builder adds everyone in the permission group builder, such as a group you made in LuckPerms. Owners are added with /rg addowner.

A player who is not a member and tries to break a block sees Hey! Sorry, but you can't break that block here. WorldGuard saves regions by itself after a short moment, in plugins/WorldGuard/worlds/world/regions.yml; /rg save writes them right away.

Turn off the game's own spawn protection

Minecraft has its own spawn protection, 16 blocks around the world spawn by default, and it lets only operators build there. Your builders would be blocked even as region members. With a WorldGuard region over spawn, set Spawn protection (blocks) in the Gameplay group of the Settings tab to 0, which is spawn-protection=0 in server.properties, and restart. The security check in our panel then says anyone can build at spawn. It only reads that setting, so with the region in place the warning does not apply.

Set region flags for PvP, mobs, explosions and a greeting

Membership decides who may build. Everything else is a flag: a rule with a value, set per region. A typical spawn:

In the game

/rg flag spawn pvp deny
/rg flag spawn mob-spawning deny
/rg flag spawn creeper-explosion deny
/rg flag spawn tnt deny
/rg flag spawn fire-spread deny
/rg flag spawn use allow
/rg flag spawn greeting Welcome to spawn!

use allow lets everyone press buttons and open doors, which a protected region otherwise blocks for visitors. To remove a flag, give it no value: /rg flag spawn pvp. /rg flags spawn shows every flag of the region as a list you can click to change values.

FlagValuesWhat it controls
pvpallow, denyPlayers hurting each other
mob-spawningallow, denyAll mob spawns, also from eggs and commands
creeper-explosion, tnt, other-explosionallow, denyDamage from explosions
fire-spread, lava-fireallow, denyFire spreading and lava setting things alight
use, chest-access, rideallow, denyDoors and buttons, containers, mounting horses and minecarts
entry, exitallow, denyWalking in or out, for non-members unless you say otherwise
greeting, farewelltextA chat line when someone walks in or out
deny-messagetextWhat players see when an action is blocked
invincible, fall-damageallow, denyTaking damage inside the region
game-modesurvival, creative, adventureThe game mode players get when they walk in

WorldGuard has many more, from leaf-decay to crop-growth. Its advice is to set flags only where you want something different from the default, and never to use protection flags such as block-break to open or close a whole region. Membership and passthrough are for that.

Make a flag apply to visitors only

A flag can be aimed at part of the players with -g. These groups are WorldGuard's own and have nothing to do with permission groups:

GroupWho
allEveryone, the default for most flags
membersMembers and owners of the region
ownersOwners only
nonmembersEveryone who is not a member or owner
nonownersEveryone who is not an owner

In the game: visitors walk around spawn in adventure mode, the build team does not

/rg flag spawn -g nonmembers game-mode adventure

One flag holds one value per region. If visitors and members need two different values of the same flag, make a second region.

Turn off PvP everywhere with the global region

Every world has a region that covers all of it, called __global__. It sits below every other region and does not protect anything by default. Setting a flag on it creates it:

In the game

/rg flag __global__ pvp deny

That turns PvP off in the whole world, and an arena region with pvp allow can switch it back on in one place. On a build or creative server you can also stop building everywhere outside regions with /rg flag __global__ passthrough deny. Do not set build on the global region: it stops pistons and everything else that places or breaks blocks across the world.

Regions inside regions: priority and passthrough

Regions may overlap, and then a player has to be a member of all of them to build. Two tools change that.

  • Priority. Every region starts at 0. Where regions overlap, only the ones with the highest priority count for building, and the highest one that sets a flag decides that flag. A shop inside spawn with its own owner gets /rg setpriority shop 10.
  • Passthrough. A region made only for a flag, such as a PvP arena inside spawn, should not protect anything by itself. /rg flag arena passthrough allow makes it transparent for building, so spawn's members can still work there.

In the game: an arena inside spawn

/rg define arena
/rg flag arena pvp allow
/rg flag arena passthrough allow

When two regions with the same priority disagree on an allow or deny flag, deny wins.

Keep players out of an area

entry applies to non-members unless you choose a group, so a staff room is two commands:

In the game

/rg define staffroom
/rg addmember staffroom g:mod
/rg flag staffroom entry deny

Everyone else bounces off the edge with Hey! You are not permitted to enter this area. Change that line with entry-deny-message. exit deny works the other way round and keeps non-members inside, for a jail or a parkour start.

Find, change and remove regions

CommandWhat it does
/rg listEvery region in the world you stand in
/rg info spawnOwners, members, flags, priority and corners
/rg select spawnLoads the region as your WorldEdit selection, to see or change it
/rg redefine spawnGives the region the shape of your current selection, keeping members and flags
/rg remove spawnDeletes the region
/rg addmember, /rg removememberAdds or removes players or g: groups

Right click a block with leather to list every region that covers it. That needs worldguard.region.wand, which operators have.

Region files live in the plugins folder, so the backups on our Backups tab include them. When you reset the Nether or the End, the regions of that world stay in their file and apply to the new terrain.

Let staff manage regions without op

Without op, nobody can use WorldGuard commands until a permissions plugin gives them. With LuckPerms, a moderator rank that can look up regions and change members, and an admin rank with everything:

Console, with LuckPerms

lp group mod permission set worldguard.region.info.* true
lp group mod permission set worldguard.region.list true
lp group mod permission set worldguard.region.wand true
lp group mod permission set worldguard.region.addmember.* true
lp group mod permission set worldguard.region.removemember.* true
lp group admin permission set worldguard.* true

Many region permissions also come in an own form, such as worldguard.region.addmember.own.*, which only works on regions the player owns. Keep in mind that worldguard.* contains the bypass for every region, so admins have the same blind spot as operators when they test.

Why WorldGuard is not protecting a region

What you seeUsually becauseWhat to do
You can break blocks and get no messageYou are op or hold worldguard.*, so you bypass/rg bypass off, or test without op
Players dig in from below or build on topThe region is only a few blocks tall/rg select spawn, //expand vert, /rg redefine spawn
Builders are blocked at spawnThe game's own spawn protectionSet Spawn protection (blocks) to 0 on the Settings tab
Members are blocked in a smaller regionThey are not members of the overlapping oneRaise its priority, or give the other region passthrough allow
Players get the message and the block still breaksAnother plugin allows what WorldGuard deniedLook for a second protection plugin on the same area
The greeting never showsuse-player-move-event is off in config.ymlSet it to true and restart

Written and checked by the Lodehost team, last reviewed on 7 November 2026.

FAQ

WorldGuard questions from server owners

Does WorldGuard work without WorldEdit?

No. WorldGuard will not start without WorldEdit or FastAsyncWorldEdit, because regions are drawn with a WorldEdit selection.

Can players claim their own land with WorldGuard?

There is a /rg claim command, but it needs setting up and limits per group. For survival servers where players protect their own builds, GriefPrevention is made for that; see stop griefing.

Does WorldGuard work on Fabric or NeoForge?

No, WorldGuard needs Paper, Purpur, Spigot or Folia. WorldEdit itself does exist for Fabric and NeoForge.

How do I protect the whole world from building?

Set /rg flag __global__ passthrough deny. Building is then only possible in regions where the player is a member. Do not use the build flag for this.

Can a region show a title on screen instead of a chat line?

Yes, with the greeting-title flag. Text after \n becomes the subtitle: /rg flag spawn greeting-title Spawn\nNo PvP here. farewell-title does the same when players leave.

Where does WorldGuard save regions?

In plugins/WorldGuard/worlds/<world name>/regions.yml, one file per world. It is plain text, so it comes along when you copy or back up the plugins folder.

WorldGuard and WorldEdit, installed from the panel.

The Plugins tab picks the builds for your Minecraft version, the Files tab edits config.yml and regions.yml, and daily backups keep your regions.

See the plugin installer