Skip to main content
infoServer ErrorsAffects: Java Edition dedicated servers

How to Fix Spawn Protection Blocking Players

Players who aren't operators can't build or use blocks near world spawn on a dedicated server. How the area is sized, who bypasses it and how to turn it off.

Quick Fix

Set spawn-protection=0 in server.properties and restart the server to turn it off, or make trusted builders operators, because operators aren't affected by it.

Error Message

12, 64, -8 is under spawn protection

How to Fix

1

Set spawn-protection=0 in server.properties and restart. Zero or any negative number turns spawn protection off.

2

Or make the area smaller. Each side of the square is twice the value plus one block, so 1 protects 3 by 3 blocks and 8 protects 17 by 17.

3

Make trusted builders operators with /op. Operators can build and use blocks inside the protected area.

4

Move world spawn with /setworldspawn if the protected square sits on top of your build. The square follows world spawn, including into another dimension.

5

Remember that pistons, dispensers, explosions and mob griefing can still change blocks inside the area.

Common Causes

  • spawn-protection in server.properties is 16 by default, which protects a 33 by 33 block square around world spawn. Only the x and z distance count, so the square covers every height.
  • The player isn't an operator. Anyone listed in ops.json can build there, whatever their op level.
  • The server has at least one operator. Spawn protection is skipped while ops.json is empty, so it can seem to start working the moment you op the first player.
  • It applies in the dimension that holds world spawn. That is the Overworld, unless someone ran /setworldspawn in another dimension, which works since 1.21.9.

Diagnostic Steps

  1. Check spawn-protection in server.properties.
  2. Open ops.json and see whether the server has any operators.
  3. Measure how far the build is from world spawn on the x and z axes.
  4. Lower or disable spawn-protection, or op trusted builders, then restart the server.

FAQ

Why can't players open doors or chests near spawn?

Spawn protection blocks right-clicking blocks as well as breaking and placing them. On 26.2, players who aren't operators get a red message above the hotbar saying that position is under spawn protection.

How big is the protected area?

Each side is twice the spawn-protection value plus one block, centered on world spawn. The default of 16 protects 33 by 33 blocks, at every height.

Does spawn protection work in singleplayer or LAN worlds?

No. It only exists on dedicated servers, so a build that is blocked on your server works fine in singleplayer.

Why did spawn protection only start working now?

It is skipped while the server has no operators. As soon as the first player is added to ops.json, the protected area applies to everyone else.

Related Errors

Need More Help?