WorldEdit and WorldGuard: Build and Protect on Your Server
WorldEdit and WorldGuard get mentioned in the same breath constantly, but they do completely different jobs. WorldEdit edits terrain in bulk: you select two corner points with a wooden axe and a command such as //set stone changes 200,000 blocks in one go. WorldGuard draws regions around an area and enforces rules inside them, such as no building, no PvP, no mob spawns and no explosion damage. They belong together because WorldGuard has no selection tool of its own and therefore requires WorldEdit; the reverse is not true.
What does WorldEdit actually do?
WorldEdit is a server-side plugin for Paper, Purpur or Spigot. Players do not have to install anything, and you type commands with a double slash that act on whatever you have selected at that moment. It is one of the core plugins you will find on virtually every serious server, alongside EssentialsX, LuckPerms and CoreProtect.
The pattern is always the same: make a selection, run the operation, check the result, undo it if needed.
| Command | What it does |
|---|---|
//wand | Gives you the selection axe: left-click sets point 1, right-click sets point 2 |
//set stone | Fills the whole selection with a block. //set air empties it |
//replace dirt grass_block | Swaps only the first block for the second, everything else stays put |
//copy and //paste | Copies the selection relative to where you stand and pastes it elsewhere |
//undo | Reverses your last operation; //undo 5 reverses the last five |
//schem save spawn | Saves the selection as a schematic in plugins/WorldEdit/schematics |
How do you make a selection and what do you do with it?
- Type
//wand. A wooden axe appears in your hand. - Left-click one corner block and right-click the opposite corner block. Your selection is the box between those two points.
- Use
//sizeto check how many blocks are inside, always before you run anything. - Adjust it with
//expand 10 up,//contract 5 northor//expand vert(from bedrock to build height). - Run the operation, for example
//replace stone deepslate.
If you want something other than a rectangular box, switch to a polygon with //sel poly or to a cylinder with //sel cyl. For natural terrain you use brushes: //brush sphere grass_block 5 places a sphere with radius 5 at a distance, and //brush smooth flattens out bumps. A schematic is a saved selection: store it with //schem save name, load it back with //schem load name and then //paste. That is how you move a spawn build from your test server to your live server without dragging the whole world along.
What does WorldGuard actually do?
WorldGuard polices rules inside an area. You define a region (a name plus a chunk of space) and set flags on it: on/off switches or values for a specific game mechanic. Outside the region nothing changes.
| Flag | What it enforces |
|---|---|
build deny | Nobody builds or breaks, except members and owners |
pvp deny | Players cannot hit each other inside the region |
mob-spawning deny | No natural mob spawns, so no zombies in your spawn building |
creeper-explosion deny | Creepers no longer do block damage inside the region |
tnt deny | TNT does not detonate or does no damage |
greeting Welcome to spawn | Shows a message as someone walks in |
Regions are allowed to overlap. Which rule wins is decided by /rg setpriority name 10: the higher the number, the more weight that region carries. That is how you carve a PvP arena out of an otherwise protected spawn. The region __global__ applies to the entire world; treat it carefully, because a mistake there hits everything.
How do you protect your spawn with WorldEdit and WorldGuard together?
- Put both jar files in the
pluginsfolder and restart the server. WorldGuard will not start without WorldEdit. - Give your staff group the permissions
worldedit.*andworldguard.*through LuckPerms, otherwise every command gets refused. - Grab the selection axe with
//wandand click the two opposite corners of your spawn area. - Type
//expand vert. The region now runs from bedrock to build height, so nobody can dig under it or build over it. - Create the region with
/rg define spawn. Then check with/rg info spawnthat the corner points are right. - Set your flags:
/rg flag spawn build deny,/rg flag spawn pvp deny,/rg flag spawn mob-spawning deny,/rg flag spawn creeper-explosion denyand/rg flag spawn tnt deny. - Add builders with
/rg addmember spawn Name; they can still build despitebuild deny. - Test with an account that has no op rights. Operators bypass WorldGuard by default, so if you are opped yourself everything looks fine while ordinary players still hit a wall.
That last step is the one most often skipped, and it generates the most support questions. Check that a chest and a door still open, too: build deny blocks interaction with some blocks. Fix that with /rg flag spawn use allow, not by opening up build rights.
When does a WorldEdit operation make your server stutter?
By default WorldEdit runs an operation on the main thread. While that is busy, everything else stands still: no ticks (the server's update cycles), frozen redstone, motionless mobs and eventually timeouts for players. With a few thousand blocks you will notice nothing; with millions you certainly will.
| Selection | Number of blocks | What to expect |
|---|---|---|
| 50 x 50 x 10 | 25,000 | Done almost instantly, no noticeable stutter |
| 100 x 100 x 20 | 200,000 | Brief tick spike, players see a short judder |
| 200 x 200 x 50 | 2,000,000 | Clear lag, risk of timeouts for players |
| 500 x 500 x 100 | 25,000,000 | Server stalls for a long time; the watchdog may kill it |
The cost does not stop once the command finishes, either. Every chunk (16x16 block section of the world) you touched has to be relit and written back to disk, and the undo history stays in memory so that //undo still works. A monstrous //set therefore chews through a lot of RAM temporarily, on top of what your world already uses, and on a 2 GB package at EUR 2.20 per month you will feel that sooner than on 8 GB.
How do you limit the risk of large operations?
The single most important measure is a hard limit. In plugins/WorldEdit/config.yml, under limits, there is a setting called max-blocks-changed. The value -1 means unlimited; put a real number there instead, half a million for instance, and someone with an oversized selection gets an error message rather than a frozen server. In the same section, max-brush-radius caps how large brushes are allowed to get. The permission worldedit.limit.unrestricted lifts the limit again, and you grant that only to yourself.
Beyond that, this helps:
- Break a big project into chunks of a few hundred thousand blocks, with a breather in between.
- Do heavy terrain work when nobody is online, not during the evening peak.
- Make a backup first. Automatic backups are included with every package at Minecraft hosting from MC-Node, but a manual backup right before a big intervention takes a minute and saves you an evening of work.
- Use
//sizebefore you type//set; those two seconds prevent most accidents. - Measure what is really happening with spark. See our article on optimising your Minecraft server for how to read TPS and tick duration.
If you routinely work with enormous selections, on a creative build server for example, look at FastAsyncWorldEdit. That fork processes operations largely off the main thread and is much kinder to your TPS. If you adjust a spawn once a month, plain WorldEdit with a sensible limit is all you need.
When do you not really need WorldGuard?
WorldGuard is work: you draw every region yourself and set every flag yourself. On a server where players mainly want to protect their own house, GriefPrevention is often the better choice, because there players claim a patch of land themselves with a golden shovel without involving you at all. Plenty of servers run both: GriefPrevention for players, WorldGuard for spawn, warps and events.
WorldGuard prevents damage, but it repairs nothing. To roll back grief outside your regions you need CoreProtect, which logs every block change and can undo it per player or per area. The two complement each other.
Sometimes you need neither. If you run a small SMP with friends you trust, the built-in spawn protection in server.properties (the main settings file) is enough. If you run a modpack server on Forge or NeoForge, such as All the Mods 10 on Minecraft 1.21.1, the choice is already made for you: that software does not load Bukkit plugins, so you fall back on whatever the pack ships with. If you are still weighing up your server software, start by reading how to set up a Minecraft server.
Frequently asked questions
Do I need WorldEdit in order to use WorldGuard? Yes. WorldGuard uses the WorldEdit selection to mark out a region and will not start without that plugin. The other way round is fine: WorldEdit works perfectly well on its own if all you want to do is edit terrain.
Why do I get "You are not permitted to do that" on //set? Usually permissions. WorldEdit commands sit behind nodes such as worldedit.region.set, and without a permissions plugin only an operator gets them. LuckPerms is the standard way to handle this in 2026; give your staff group worldedit.* and try again.
How large can a //set be without causing problems? A selection of 100 x 100 x 20 is 200,000 blocks and causes a brief judder at most on a normal server. From a few million blocks onwards the server visibly stalls and players can time out. That is why you should set max-blocks-changed in plugins/WorldEdit/config.yml to a real value instead of -1.
Can I run WorldEdit on a modpack server? Not as a plugin. Modpacks such as All the Mods 10 run on NeoForge with Minecraft 1.21.1 and Java 21, and a NeoForge server does not load Bukkit plugins. Plugins work on Paper, Purpur or Spigot, with Paper being the default choice for most servers.
Does //undo still work after a restart? No. The undo history is kept in memory per player and disappears on a restart or reload. If you need to reverse something, do it in the same session with //undo; if the server has already restarted, you need a backup or CoreProtect.