Defense
A modification that protects players from unwanted PvP interactions while preserving the ability for battles on servers!
Originally developed and tested on the Empty World SMP server
Showcase Video:
Features
In survival mode, a PvP protection toggle appears in the player's inventory. When activated, the character becomes immune to all types of damage from other players — including direct attacks, projectiles, and activated TNT explosions. Outgoing attacks are also blocked: in protected mode, you cannot deal damage to other players or receive it from them.
Protection lasts for 20 minutes before deactivating. Sixty seconds before the protection expires, the system will warn you with a chat message, offering to reactivate the mode if needed. You can manually enable or disable protection at any time to reset the timer.
Players with active protection display a shield icon next to their username. Its appearance can be changed in Minecraft's character settings.
The AFK system automatically enables protection after 1 minute of inactivity to prevent sudden attacks. The interval can be configured via the afkTimerSeconds game rule (setting it to 0 disables the function).
Examples of available icons: [Image of available icons would appear here]
(These icons are selected in Minecraft's character settings)
Future updates plan to add new features and improvements for greater convenience.
Why 20 Minutes?
The twenty-minute timer encourages players to keep protection turned off more often. This preserves the possibility of random funny interactions (like an accidental punch) or maintains tension in mob battles when you need to carefully avoid hitting allies. The system is designed to protect against unwanted conflicts, not to gain tactical advantages.
