Establish non-combat areas where players can be free from hostile mobs! Craft zones where combat, damage, projectiles, and enemy creatures cannot harm you! This datapack is optimized for performance, ensuring smooth operation even on less powerful servers.
Key Features
Form spherical safe zones in six distinct 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 by default, customizable within the files. Explore the Commands section below for guidance on creating safe zones and more!
Inside a Safe Zone, the Following Rules Apply:
- Players in survival and adventure modes cannot take or inflict damage.
- Hostile mobs vanish immediately without leaving behind loot.
- Most projectiles are eliminated instantly, with the exception of ender pearls, player-thrown breeze charges, and snowballs.
- Tridents drop to the ground immediately.
- The area is protected from explosions and fire caused by lightning. However, be cautious, as fire from outside a safe zone can spread in if the border blocks permit it.
Additional Functionalities
- Permit specific hostile mobs inside safe zones.
- Freeze the movement of designated mobs.
- Render mobs invulnerable to player damage in survival and adventure modes.
- Show or hide the center point of a safe zone.
- Access numerous additional quality-of-life commands.
Visual Effects
- Projectiles bounce off a magical barrier, producing blue sparks, accompanied by a high-pitched shattering sound.
- Hostile mobs have their essence stripped away as they are pulled underground upon entering a safe zone.
- All safe zone commands provide enhanced feedback for clearer understanding.
Compatibility
Safe Zones also prevent weapon usage from Incendium and Spellbound Weapons.
Commands Overview
- General Commands
- /function safezone:cmd/help – Provides a list of all available safe zone commands.
- /function safezone:cmd/create/size[1-5] – Establishes a safe zone of the designated size.
- /function safezone:cmd/move/safezone – Relocates the nearest safe zone to your current position.
- /function safezone:cmd/tp/safezone – Teleports you to the nearest safe zone.
- /function safezone:cmd/delete/nearest – Removes the nearest safe zone.
- /function safezone:cmd/delete/nearby – Deletes all safe zones within a 100-block radius.
- /function safezone:cmd/delete/all – Deletes all currently existing safe zones.
- Visibility Options
When a safe zone is made visible, soulflame particles will sparkle at the center once you enter its range. This assists in understanding their range and can help in locating them.
- /function safezone:cmd/show/nearest – Displays the center of the nearest safe zone.
- /function safezone:cmd/show/nearby – Shows the center of all safe zones within 100 blocks.
- /function safezone:cmd/show/all – Reveals the center of all currently active safe zones.
- /function safezone:cmd/hide/nearest – Conceals the center of the nearest safe zone.
- /function safezone:cmd/hide/nearby – Hides the center of all safe zones within 100 blocks.
- /function safezone:cmd/hide/all – Hides the center of all presently active safe zones.
- Anti-Grief Measures within Spawn Chunks
For optimal server performance, safe zones activate only when players are in proximity. If a safe zone lies within always-loaded spawn chunks, certain entities could disrupt the area without players nearby. To mitigate this risk, designate it as a spawn safe zone:
- /function safezone:cmd/add/spawn – Activates continuous Anti-Grief for the nearest safe zone.
- /function safezone:cmd/remove/spawn – Reverts to standard Anti-Grief for the nearest safe zone.
- /function safezone:cmd/move/safezone – Moves the nearest spawn safe zone to your location.
- /function safezone:cmd/tp/safezone – Teleports you to the nearest spawn safe zone.
- Make Entities Invulnerable in Survival & Adventure Modes
- /function safezone:cmd/add/invulnerable – Makes the nearest entity invulnerable.
- /function safezone:cmd/remove/invulnerable – Restores vulnerability to the nearest entity.
- /function safezone:cmd/move/invulnerable – Relocates the nearest invulnerable entity safe zone to your position.
- /function safezone:cmd/tp/invulnerable – Teleports you to the nearest invulnerable entity.
- Authorize Certain Entities within Safe Zones
- /function safezone:cmd/add/allowed – Permits the nearest entity within safe zones.
- /function safezone:cmd/remove/allowed – Disallows the nearest entity within safe zones.
- /function safezone:cmd/move/allowed – Moves the nearest allowed entity to your position.
- /function safezone:cmd/tp/allowed – Teleports you to the nearest allowed entity.
- Freeze the Movement of Specific Entities
- /function safezone:cmd/add/frozen – Freezes the closest entity’s movement.
- /function safezone:cmd/remove/frozen – Unfreezes the closest entity’s movement.
- /function safezone:cmd/move/frozen – Moves the nearest frozen entity to your position.
- /function safezone:cmd/tp/frozen – Teleports you to the nearest frozen entity.
Installation Instructions
To install this datapack effectively, use /reload after placing the SafeZone.zip file into your world’s datapacks folder.
Uninstallation Process
This datapack can be removed without prior uninstallation. Execute /function safezone:cmd/delete/all to erase all currently active safe zones.