Spawn Protection banner
Spawn Protection icon

Spawn Protection

Make is so that i can select an area with command and you cant go in that area when in combat with a player and you get knockbacked from there. After 30 no...

00
paperServer1.21.10mod

Spawn Protection

  • Adds a single protected cuboid you set with /spawnprotection pos1 and /spawnprotection pos2; the bounds are saved to config.yml and persist after restarts. /spawnprotection info, clear, and reload are available for management (permission spawnprotection.admin).
  • Players who take or deal player-vs-player damage are combat-tagged for the configured duration (default 30s). While tagged, moving or teleporting into the protected area is blocked, a knockback is applied away from the region center, and an action-bar reminder shows remaining combat time.
  • Inside the protected region players are damage-immune, mobs cannot spawn or teleport in, and a periodic sweep knocks out any non-player living entities to keep the zone AFK-safe.
  • Knockback strength and combat timeout can be tuned via combat.timeout-seconds, knockback.horizontal, and knockback.vertical in config.yml.
  • Notes/limitations: only one region is supported and both corners must be in the same world; the sweep runs every 10 ticks so mobs near the edge may briefly step in before being pushed out; there is no explicit bypass permission beyond giving admins control of the region.

Server Validation

Server validation passed - The mod was tested on a real Minecraft server and loaded successfully.