Compatibility
Minecraft: Java Edition
Platforms
Links
Tags
Creators
Details
EternityGuard
A lightweight Minecraft Java datapack designed to deter players from harming villagers and iron golems. Whenever a player directly kills a protected entity, EternityGuard announces the incident globally in chat and teleports the responsible player to a designated punishment zone.
Unlike a simple teleport punishment, EternityGuard keeps offenders confined to the zone. Players can move freely within its boundaries, but attempting to escape or dying to avoid punishment won't free them.
🚀 Features
-
Villager & Golem Protection: Automatically detects direct player kills of villagers and iron golems.
-
Global Chat Broadcast: Announces punishment incidents publicly so everyone on the server knows what happened.
-
Restricted Punishment Zone: Teleports offenders to a designated location and allows free movement within a configurable radius.
-
Escape Prevention: Automatically returns punished players who leave the permitted area.
-
Persistent Punishment: Dying, respawning, or reconnecting to the server does not remove an active punishment.
-
Repeatable Triggers: Revokes the triggering advancement after punishment so it can trigger again on future offenses.
-
Admin-Controlled Release: Server operators can release a punished player using the vanilla
/tagcommand. -
Vanilla Friendly: Uses standard Minecraft datapack functionality without requiring additional mods or plugins.
⚙️ Customization
Changing the Punishment Zone
The default punishment zone is centered at X: 0, Y: 0, Z: 0, with a default radius of 7 blocks.
You can customize the zone to fit your world:
- Open the datapack ZIP archive using a standard archive tool.
- Navigate to the relevant function files under
data/eternity_guard/function/. - Locate the commands responsible for the punishment destination and boundary enforcement.
- Change the center coordinates or radius to your preferred values.
- Save the changes while preserving the original ZIP folder structure.
Important: Update all relevant functions that reference the zone, including the initial punishment teleport and boundary enforcement. Changing only the initial teleport destination may cause the player to be returned to the old location.
Releasing a Punished Player
An operator can release a player by running:
/tag <player> remove eternity_guard.punished
Replace <player> with the target player's username. This removes the persistent punishment tag.
📦 Installation
- Download the EternityGuard ZIP file.
- Locate your server or single-player world's
datapacksfolder. On a dedicated server, this is normally inside the active world directory. - Place the ZIP file directly inside the
datapacksfolder. Do not extract it. - Run
/reloadin-game or from the server console. - Verify that the datapack is enabled:
/datapack list enabled
📋 Compatibility
- Minecraft Java Edition: 26.2
- Requirements: A world or server that supports standard Minecraft datapacks.
- External dependencies: None.
EternityGuard was originally developed for Eternity SMP to encourage responsible gameplay and protect villagers and iron golems through automatic punishment enforcement.

