SafeZone - Protected Areas in Minecraft
Create special zones where PvP, damage, projectiles, and hostile mobs are disabled! This datapack is optimized to run even on low-end servers.
Main Features
Zone Sizes
Available in 6 different spherical zone sizes:
- Size 1 - 15 block radius
- Size 2 - 31 block radius
- Size 3 - 47 block radius
- Size 4 - 63 block radius
- Size 5 - 79 block radius
- Size C - 45 block radius (default), customizable in datapack files
Zone Rules
Inside protected zones, the following rules apply:
- Players in survival and adventure modes cannot take or deal damage
- Hostile mobs instantly disappear without dropping loot
- Most projectiles are removed (exceptions: ender pearls, breeze charges, and snowballs)
- Tridents drop to the ground
- Protection from explosions and fire from lightning strikes
Warning: Fire from outside can spread inside if border blocks allow it.
Additional Features
- Allow specific hostile mobs inside zones
- Freeze mob movement
- Make mobs invulnerable to players
- Show and hide zone centers
- Many convenient commands
Visual Effects
- Projectiles bounce off a magical barrier with blue sparks and sound
- Hostile mobs sink underground when entering a zone
- All commands provide clear feedback
Compatibility
Protected zones block weapon usage from Incendium and Spellbound Weapons.
Commands
General Commands
/function safezone:cmd/help
- Shows list of all available commands
/function safezone:cmd/create/size[1-5]
- Creates zone of specified size
/function safezone:cmd/move/safezone
- Moves nearest zone to your position
/function safezone:cmd/tp/safezone
- Teleports to nearest zone
/function safezone:cmd/delete/nearest
- Deletes nearest zone
/function safezone:cmd/delete/nearby
- Deletes all zones within 100 blocks
/function safezone:cmd/delete/all
- Deletes all loaded zones
Zone Visibility
When zones are visible, particles appear at the center when you're within range.
/function safezone:cmd/show/nearest
- Shows center of nearest zone
/function safezone:cmd/show/nearby
- Shows centers of all zones within 100 blocks
/function safezone:cmd/show/all
- Shows centers of all loaded zones
/function safezone:cmd/hide/nearest
- Hides center of nearest zone
/function safezone:cmd/hide/nearby
- Hides centers of all zones within 100 blocks
/function safezone:cmd/hide/all
- Hides centers of all loaded zones
Spawn Chunk Protection
To save performance, zones are only active when players are nearby. In spawn chunks, you can make zones permanently active:
/function safezone:cmd/add/spawn
- Permanent protection for nearest zone
/function safezone:cmd/remove/spawn
- Regular protection for nearest zone
Entity Management
/function safezone:cmd/add/invulnerable
- Makes nearest entity invulnerable
/function safezone:cmd/remove/invulnerable
- Makes nearest entity vulnerable
/function safezone:cmd/add/allowed
- Allows nearest entity in zones
/function safezone:cmd/remove/allowed
- Disallows nearest entity in zones
/function safezone:cmd/add/frozen
- Freezes movement of nearest entity
/function safezone:cmd/remove/frozen
- Unfreezes movement of nearest entity
Global Zone Effects
/function safezone:cmd/add/entity_resistance
- Entities in nearest zone take no damage
/function safezone:cmd/remove/entity_resistance
- Entities in nearest zone take damage
/function safezone:cmd/add/entity_weakness
- Entities in nearest zone deal no melee damage
/function safezone:cmd/remove/entity_weakness
- Entities in nearest zone deal melee damage
Installation
Place SafeZone.zip file in your world's datapacks folder and execute /reload to activate.
Uninstallation
Execute /function safezone:cmd/delete/all to delete all loaded zones.