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
stop

After 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.

text
//wand                         # Gives you a wooden axe
# Left click  - 1st corner point
# Right click - 2nd corner point

Method 2: Selecting by Command

text
//pos1                         # Set your current position as point 1
//pos2                         # Set your current position as point 2

Method 3: Selecting by Coordinates

text
//pos1 100,64,200              # Point 1 with X,Y,Z coordinates
//pos2 200,128,300              # Point 2 with X,Y,Z coordinates

Expanding the Selection

text
//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 south

Region Commands

Once you have made a selection, these are the commands for defining and managing regions:

CommandDescriptionPermission
/rg define spawnDefine the selected area as a region named 'spawn'worldguard.region.define.*
/rg redefine spawnUpdate an existing region's boundaries (with a new selection)worldguard.region.redefine.*
/rg remove arenaDelete the regionworldguard.region.remove.*
/rg info spawnShow the region's detailsworldguard.region.info.*
/rg listList every regionworldguard.region.list
/rg list -w netherList the regions in a specific worldworldguard.region.list
/rg addowner spawn PlayerAdd an owner to the regionworldguard.region.addowner.*
/rg addmember spawn PlayerAdd a member to the regionworldguard.region.addmember.*
/rg removeowner spawn PlayerRemove ownershipworldguard.region.removeowner.*
/rg removemember spawn PlayerRemove membershipworldguard.region.removemember.*
/rg select spawnLoad an existing region into the WorldEdit selectionworldguard.region.select
/rg tp spawnTeleport to the regionworldguard.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

FlagDefaultDescription
pvpallowPlayers damaging each other
invincibility-Players in the region take no damage
mob-damageallowMobs damaging players
fall-damageallowFall damage
fire-damageallowFire damage
potion-splashallowSplash potion effects

Build and Break Flags

FlagDefaultDescription
buildallow (member/owner)General build/break permission
block-break-Block breaking control only
block-place-Block placing control only
interactallowInteraction with doors, buttons, levers
useallowItem usage (axe, bucket, etc.)
chest-accessallowChest/furnace/smoker access
vehicle-placeallowPlacing boats/minecarts
vehicle-destroyallowDestroying boats/minecarts

Mob and Spawn Flags

FlagDefaultDescription
mob-spawningallowControls all mob spawning
deny-spawn-Block specific mob types (e.g. creeper,skeleton)
entity-painting-destroyallowMobs destroying paintings
entity-item-frame-destroyallowMobs destroying item frames

Explosion and Nature Flags

FlagDefaultDescription
creeper-explosionallowCreeper explosions
tntallowTNT explosions
other-explosionallowOther explosions (bed, crystal, etc.)
fire-spreadallowFire spreading
lava-fireallowLava starting fires
lightningallowLightning strikes
snow-fallallowSnowfall
snow-meltallowSnow melting
ice-formallowIce forming
ice-meltallowIce melting
mushroom-growthallowMushroom growth
leaf-decayallowLeaf decay
grass-growthallowGrass growth
vine-growthallowVine growth
crop-growthallowCrop growth
soil-dryallowSoil drying out

Teleport and Movement Flags

FlagDefaultDescription
entryallowPermission to enter the region
exitallowPermission to leave the region
enderpearlallowTeleporting with an ender pearl
chorus-fruit-teleportallowTeleporting with chorus fruit
teleportallowTeleporting with commands such as /tp
spawn-teleportallowTeleporting with the /spawn command

Message and Information Flags

FlagDefaultDescription
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
text
/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&lSPAWN

Other Important Flags

FlagDefaultDescription
item-pickupallowPicking items up off the ground
item-dropallowDropping items
exp-dropsallowXP orbs dropping
send-chatallowSending chat messages
receive-chatallowReceiving chat messages
pistonsallowPiston movement
rideallowRiding an animal/vehicle
sleepallowSleeping in a bed
respawn-anchorsallowUsing respawn anchors
frosted-ice-formallowFrost Walker ice forming

The Priority System

When regions overlap, the priority value decides which flags apply. A higher number = higher priority. Default priority: 0.

text
# 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
PriorityExample use
0Default regions
1Large areas such as cities and towns
5Regions that need special rules
10Overlapping areas such as arenas and PvP zones
100Areas 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.

text
# 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.

text
# 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 deny

Spawn Protection, Step by Step

Follow the steps below to protect your server's spawn area:

text
# 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
FlagValueWhy
builddenyBlocks placing/breaking blocks
pvpdenyNo fighting at spawn
mob-spawningdenyKeeps mobs from spawning at spawn
creeper-explosiondenyBlocks creeper damage
tntdenyBlocks TNT damage
fire-spreaddenyBlocks fire from spreading
enderpearldenyBlocks pearling into the protected area
chorus-fruit-teleportdenyBlocks the chorus fruit bypass
item-dropdenyBlocks dropping items on the ground (optional)
interactallowInteraction with NPCs and signs

Setting Up a PvP Arena

To create a dedicated area where players can fight:

text
# 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 10

Blacklist Configuration

With the blacklist you can block the use, placement or breaking of specific items across the whole world. File: plugins/WorldGuard/blacklist.txt

text
# 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 eventDescription
on-placeTriggered on an attempt to place the block
on-breakTriggered on an attempt to break the block
on-useTriggered on an attempt to use the item
on-interactTriggered on interaction with the block
on-dropTriggered on an attempt to drop the item
on-acquireTriggered on an attempt to acquire the item
Blacklist actionDescription
denyBlock the action
tellShow the player a message
logLog it to the console/file
kickKick the player from the server
banBan the player

The WorldGuard Config File

Global settings are made in the plugins/WorldGuard/config.yml file:

yaml
# 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 types

Common Mistakes and Their Fixes

ProblemCauseFix
The region is not protecting anythingNo selection was made, or //expand vert was forgottenCheck the boundaries with /rg info, redefine with //expand vert
Owners/members cannot buildbuild deny affects everyoneSet the build flag to none - members/owners are then allowed automatically
A flag is not workingThe region's priority is low and another region overrides itCheck the priority with /rg info, raise it with /rg setpriority
A global flag is affecting regions__global__ applies everywhereOverride the relevant flag as allow inside the region
PvP cannot be turned offAnother plugin is controlling PvPCheck pvp: true in EssentialsX, make sure WorldGuard loads first
Players enter the region with ender pearlsenderpearl deny was never setRun /rg flag region enderpearl deny
Mobs are spawning inside the regionmob-spawning deny was forgottenSet the flag and clear the existing mobs with /butcher
The region is huge and causing laguse-player-move-event is heavy across a large number of regionsDelete unnecessary regions, reduce the region count

WorldGuard Permissions

PermissionDescription
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.listListing regions
worldguard.region.tpTeleporting to a region
worldguard.region.bypass.*Bypassing region protection (admin)

Useful Resources