What Is WorldGuard?
WorldGuard is the most comprehensive plugin for region protection on Minecraft servers. It offers dozens of features: protecting specific areas from griefing, creating PvP zones, controlling mob spawning, banning items, blocking explosions and setting world-wide rules.
- Unlimited region definitions - nested, overlapping, across different worlds
- Fine-grained control with 50+ flags
- Priority and child region system
- Global rules - settings that cover the entire world
- Blacklist - ban specific items
- WorldEdit integration - visual region selection
Installation
You need to install WorldGuard and WorldEdit together. Both go into the plugins/ folder.
cd ~/server/plugins
# WorldEdit (required dependency)
wget https://dev.bukkit.org/projects/worldedit/files/latest -O WorldEdit.jar
# WorldGuard
wget https://dev.bukkit.org/projects/worldguard/files/latest -O WorldGuard.jar
# Restart the server
stopAfter the first start-up, config files will be created in the plugins/WorldGuard/ folder.
Selecting a Region with WorldEdit
Before defining a region you have to select the area with WorldEdit. There are three different methods:
Method 1: The Wand Tool
The most common method. You select the two corners by left/right clicking with a wooden axe.
//wand # Gives you a wooden axe
# Left click - 1st corner point
# Right click - 2nd corner pointMethod 2: Selecting by Command
//pos1 # Set your current position as point 1
//pos2 # Set your current position as point 2Method 3: Selecting by Coordinates
//pos1 100,64,200 # Point 1 with X,Y,Z coordinates
//pos2 200,128,300 # Point 2 with X,Y,Z coordinatesExpanding the Selection
//expand vert # Expand to the sky and to bedrock (Y=-64 - Y=320)
//expand 10 north # Expand 10 blocks north
//expand 5 up # Expand 5 blocks up
//contract 3 south # Contract 3 blocks from the southRegion Commands
Once you have made a selection, these are the commands for defining and managing regions:
| Command | Description | Permission |
|---|---|---|
/rg define spawn | Define the selected area as a region named 'spawn' | worldguard.region.define.* |
/rg redefine spawn | Update an existing region's boundaries (with a new selection) | worldguard.region.redefine.* |
/rg remove arena | Delete the region | worldguard.region.remove.* |
/rg info spawn | Show the region's details | worldguard.region.info.* |
/rg list | List every region | worldguard.region.list |
/rg list -w nether | List the regions in a specific world | worldguard.region.list |
/rg addowner spawn Player | Add an owner to the region | worldguard.region.addowner.* |
/rg addmember spawn Player | Add a member to the region | worldguard.region.addmember.* |
/rg removeowner spawn Player | Remove ownership | worldguard.region.removeowner.* |
/rg removemember spawn Player | Remove membership | worldguard.region.removemember.* |
/rg select spawn | Load an existing region into the WorldEdit selection | worldguard.region.select |
/rg tp spawn | Teleport to the region | worldguard.region.tp |
Flags Table
Flags control the behaviour inside a region. They can take three values: allow, deny, none (inherit from the parent region). Syntax: /rg flag region_name flag value
PvP and Combat Flags
| Flag | Default | Description |
|---|---|---|
pvp | allow | Players damaging each other |
invincibility | - | Players in the region take no damage |
mob-damage | allow | Mobs damaging players |
fall-damage | allow | Fall damage |
fire-damage | allow | Fire damage |
potion-splash | allow | Splash potion effects |
Build and Break Flags
| Flag | Default | Description |
|---|---|---|
build | allow (member/owner) | General build/break permission |
block-break | - | Block breaking control only |
block-place | - | Block placing control only |
interact | allow | Interaction with doors, buttons, levers |
use | allow | Item usage (axe, bucket, etc.) |
chest-access | allow | Chest/furnace/smoker access |
vehicle-place | allow | Placing boats/minecarts |
vehicle-destroy | allow | Destroying boats/minecarts |
Mob and Spawn Flags
| Flag | Default | Description |
|---|---|---|
mob-spawning | allow | Controls all mob spawning |
deny-spawn | - | Block specific mob types (e.g. creeper,skeleton) |
entity-painting-destroy | allow | Mobs destroying paintings |
entity-item-frame-destroy | allow | Mobs destroying item frames |
Explosion and Nature Flags
| Flag | Default | Description |
|---|---|---|
creeper-explosion | allow | Creeper explosions |
tnt | allow | TNT explosions |
other-explosion | allow | Other explosions (bed, crystal, etc.) |
fire-spread | allow | Fire spreading |
lava-fire | allow | Lava starting fires |
lightning | allow | Lightning strikes |
snow-fall | allow | Snowfall |
snow-melt | allow | Snow melting |
ice-form | allow | Ice forming |
ice-melt | allow | Ice melting |
mushroom-growth | allow | Mushroom growth |
leaf-decay | allow | Leaf decay |
grass-growth | allow | Grass growth |
vine-growth | allow | Vine growth |
crop-growth | allow | Crop growth |
soil-dry | allow | Soil drying out |
Teleport and Movement Flags
| Flag | Default | Description |
|---|---|---|
entry | allow | Permission to enter the region |
exit | allow | Permission to leave the region |
enderpearl | allow | Teleporting with an ender pearl |
chorus-fruit-teleport | allow | Teleporting with chorus fruit |
teleport | allow | Teleporting with commands such as /tp |
spawn-teleport | allow | Teleporting with the /spawn command |
Message and Information Flags
| Flag | Default | Description |
|---|---|---|
greeting | - | Message shown on entering the region |
farewell | - | Message shown on leaving the region |
greeting-title | - | Large on-screen title on entering the region |
farewell-title | - | Large on-screen title on leaving the region |
/rg flag spawn greeting &aWelcome to the spawn area!
/rg flag spawn farewell &7You have left the spawn area.
/rg flag spawn greeting-title &b&lSPAWNOther Important Flags
| Flag | Default | Description |
|---|---|---|
item-pickup | allow | Picking items up off the ground |
item-drop | allow | Dropping items |
exp-drops | allow | XP orbs dropping |
send-chat | allow | Sending chat messages |
receive-chat | allow | Receiving chat messages |
pistons | allow | Piston movement |
ride | allow | Riding an animal/vehicle |
sleep | allow | Sleeping in a bed |
respawn-anchors | allow | Using respawn anchors |
frosted-ice-form | allow | Frost Walker ice forming |
The Priority System
When regions overlap, the priority value decides which flags apply. A higher number = higher priority. Default priority: 0.
# City region: PvP off (priority 1)
/rg define city
/rg flag city pvp deny
/rg setpriority city 1
# Arena inside the city: PvP on (priority 10)
/rg define city-arena
/rg flag city-arena pvp allow
/rg setpriority city-arena 10
# Even though the arena sits inside the city, PvP is on because its priority is higher| Priority | Example use |
|---|---|
| 0 | Default regions |
| 1 | Large areas such as cities and towns |
| 5 | Regions that need special rules |
| 10 | Overlapping areas such as arenas and PvP zones |
| 100 | Areas that must be protected no matter what, such as spawn |
Child Regions
You can build a hierarchy by defining child regions inside a region. Child regions inherit the parent region's flags and can override them as needed.
# 1. Create the parent region
/rg define town
/rg flag town pvp deny
/rg flag town build deny
# 2. Create the child region (set the parent)
/rg define town-shop
/rg setparent town-shop town
/rg flag town-shop use allow
/rg flag town-shop chest-access allow
# Result: in town-shop pvp and build are still deny (inherited)
# but use and chest-access are allow (overridden)The Global Region (__global__)
The __global__ region applies everywhere that is not covered by a defined region. It is ideal for setting world-wide rules.
# Block creeper explosions across the whole world
/rg flag __global__ creeper-explosion deny
# Block TNT explosions across the whole world
/rg flag __global__ tnt deny
# Block fire spreading across the whole world
/rg flag __global__ fire-spread deny
# Block wither damage across the whole world
/rg flag __global__ wither-damage deny
# Block lava flow from starting fires across the whole world
/rg flag __global__ lava-fire deny
# PvP off by default (only enabled inside arenas)
/rg flag __global__ pvp denySpawn Protection, Step by Step
Follow the steps below to protect your server's spawn area:
# Step 1: Select the spawn area with WorldEdit
//wand
# Mark the two corners with left/right click
//expand vert # Cover the full height
# Step 2: Define the region
/rg define spawn
# Step 3: Set the protection flags
/rg flag spawn build deny
/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 enderpearl deny
/rg flag spawn chorus-fruit-teleport deny
# Step 4: Add the messages
/rg flag spawn greeting &a&lWelcome &7to the spawn area!
/rg flag spawn farewell &7You have left the spawn area.
# Step 5: Give it a high priority
/rg setpriority spawn 100| Flag | Value | Why |
|---|---|---|
| build | deny | Blocks placing/breaking blocks |
| pvp | deny | No fighting at spawn |
| mob-spawning | deny | Keeps mobs from spawning at spawn |
| creeper-explosion | deny | Blocks creeper damage |
| tnt | deny | Blocks TNT damage |
| fire-spread | deny | Blocks fire from spreading |
| enderpearl | deny | Blocks pearling into the protected area |
| chorus-fruit-teleport | deny | Blocks the chorus fruit bypass |
| item-drop | deny | Blocks dropping items on the ground (optional) |
| interact | allow | Interaction with NPCs and signs |
Setting Up a PvP Arena
To create a dedicated area where players can fight:
# Step 1: Select the arena area
//wand
//expand vert
# Step 2: Define the region
/rg define pvp-arena
# Step 3: Set the PvP flags
/rg flag pvp-arena pvp allow
/rg flag pvp-arena build deny
/rg flag pvp-arena item-drop deny
/rg flag pvp-arena exp-drops deny
/rg flag pvp-arena enderpearl allow
/rg flag pvp-arena mob-spawning deny
# Step 4: Entry/exit messages
/rg flag pvp-arena greeting &c&l⚔ PvP Arena &7- Watch yourself!
/rg flag pvp-arena farewell &aYou have left the PvP arena.
# Step 5: Priority (if it is inside the city, it must be higher than the city)
/rg setpriority pvp-arena 10Blacklist Configuration
With the blacklist you can block the use, placement or breaking of specific items across the whole world. File: plugins/WorldGuard/blacklist.txt
# blacklist.txt
# Block TNT usage
[tnt]
on-place=deny,tell,log
message=&cTNT is not allowed on this server!
# Block lava bucket usage
[lava_bucket]
on-use=deny,tell,log
message=&cPouring lava is not allowed!
# Block placing bedrock
[bedrock]
on-place=deny,tell
message=&cYou cannot place bedrock!
# Block barrier blocks
[barrier]
on-place=deny,tell
# Block placing ender crystals (anti-grief)
[end_crystal]
on-place=deny,tell,log
message=&cEnd crystals are not allowed!| Blacklist event | Description |
|---|---|
on-place | Triggered on an attempt to place the block |
on-break | Triggered on an attempt to break the block |
on-use | Triggered on an attempt to use the item |
on-interact | Triggered on interaction with the block |
on-drop | Triggered on an attempt to drop the item |
on-acquire | Triggered on an attempt to acquire the item |
| Blacklist action | Description |
|---|---|
deny | Block the action |
tell | Show the player a message |
log | Log it to the console/file |
kick | Kick the player from the server |
ban | Ban the player |
The WorldGuard Config File
Global settings are made in the plugins/WorldGuard/config.yml file:
# config.yml - the important settings
regions:
use-player-move-event: true # Region entry/exit checking
cancel-chat-without-recipients: true
max-claim-volume: 30000 # Maximum region volume
protection:
item-durability: true # Item durability protection
remove-infinite-stacks: false
blacklist:
use-as-whitelist: false # true = only allow what is on the list
gameplay:
block-potions: [] # Banned potion IDs
disable-xp-orb-drops: false
block-creature-spawn: [] # Banned mob spawn typesCommon Mistakes and Their Fixes
| Problem | Cause | Fix |
|---|---|---|
| The region is not protecting anything | No selection was made, or //expand vert was forgotten | Check the boundaries with /rg info, redefine with //expand vert |
| Owners/members cannot build | build deny affects everyone | Set the build flag to none - members/owners are then allowed automatically |
| A flag is not working | The region's priority is low and another region overrides it | Check the priority with /rg info, raise it with /rg setpriority |
| A global flag is affecting regions | __global__ applies everywhere | Override the relevant flag as allow inside the region |
| PvP cannot be turned off | Another plugin is controlling PvP | Check pvp: true in EssentialsX, make sure WorldGuard loads first |
| Players enter the region with ender pearls | enderpearl deny was never set | Run /rg flag region enderpearl deny |
| Mobs are spawning inside the region | mob-spawning deny was forgotten | Set the flag and clear the existing mobs with /butcher |
| The region is huge and causing lag | use-player-move-event is heavy across a large number of regions | Delete unnecessary regions, reduce the region count |
WorldGuard Permissions
| Permission | Description |
|---|---|
worldguard.region.define.* | Defining regions |
worldguard.region.flag.regions.* | Setting flags |
worldguard.region.addowner.* | Adding owners |
worldguard.region.addmember.* | Adding members |
worldguard.region.remove.* | Deleting regions |
worldguard.region.info.* | Viewing region information |
worldguard.region.list | Listing regions |
worldguard.region.tp | Teleporting to a region |
worldguard.region.bypass.* | Bypassing region protection (admin) |