
Modrinth · Minecraft mod
Defense
A mod designed to protect players from unwanted PvP interactions while still allowing PvP on servers! Originally designed for the Empty World SMP
Quick answer
Which Defense release matches 1.21?
Defense 1.21-0.4.2 targets 1.21, 1.21.1 with Fabric. Installation on the client is optional. Installation on the dedicated server is optional. No extra mods listed for this file.
Where it goes
Is Defense required on the client, server, or both?
Installation on the client is optional. Installation on the dedicated server is optional.
The source marks this as usable on both the client and server.
What else does Defense 1.21-0.4.2 need?
1.21-0.4.2 on 1.21. Every mod below is checked against that same setup.
This file does not list any required mods. Do not add a library just because a different file uses it.
This file does not list any required or optional mods.
Before you install it
Add Defense without breaking your instance.
Built for Defense 1.21-0.4.2 on 1.21. Pick another file and the loader, install side or required mods may change.
- 01
Stick to this file
Use 1.21-0.4.2. It targets 1.21, 1.21.1 with Fabric; another release may have different loader, side or dependency requirements.
- 02
Bring the mods it needs
This file does not list any required mods. Do not add a library just because a different file uses it.
- 03
Put it on the correct side
Installation on the client is optional. Installation on the dedicated server is optional.
- 04
Pick the file you checked
Use the “Get this file” button beside 1.21-0.4.2. It opens that exact file at the source.
About this project
What does Defense add?
Defense
A mod designed to protect players from unwanted PvP interactions while still allowing PvP on servers!
Originally created for and tested by the Empty World SMP
SHOWCASE VIDEO:
Features
- This mod adds a PvP toggle button in the survival player inventory.
- When checked on, the player is now immune to all incoming PvP damage. Examples include direct attacks, projectiles, and lit TNT.
This also disables the same outgoing attacks from the player. They cannot recieve damage from players or deal damage to players while toggled on. - When toggled on, Defense lasts for 20 minutes. One minute before the player's immunity runs out, they will be notified with a chat message prompting them to enable it again if they wish. The player may also enable or disable defense anytime they wish to reset the cooldown.
- If a player's defense is toggled on, a shield icon will display next to their nametag.
- You can change the icon you are displaying to others and that shows on your toggle switch in your Skin Customization Settings.
- AFK system that will toggle on Defense after 1 minute to prevent players from attacking you. Use the afkTimerSeconds gamerule to change the time it takes to toggle AFK (set to 0 to disable this feature). Still very early, but improvements and changes will be made over time!
Available Icons:

(These Icons are selectable via the Skin Customization Settings within Minecraft)
More features are planned, and updates will add new functionality to the mod, along with quality of life changes to make it even better to use.
Why the 20 Minute Timer?
The 20 minute timer for defense naturally encourages players to keep defense toggled off most of the time. This provides for the occasional funny interaction with another player, like an accidental punch, or for a challenge during a PvE battle to not hit your friends. It is meant to be used as a tool to defend against an unwanted interaction rather than something to give a competitive advantage.
For more information on this mod, and access to the code, go to this mod's GitHub page!
Project description from Modrinth.
Pick your setup
Defense by Minecraft version and loader
Choose the version and loader you play, then open the matching release.
1.21.6
1 loader build1.21.5
1 loader build1.21.4
1 loader build1.21.1
1 loader build1.21
1 loader buildCheck the dependencies, then try the file in a copied instance before changing a world you care about.
Recent files
Defense versions and loaders
1.21-0.4.2
defense-1.21-0.4.2.jar
8 Mar 2025
1.21-0.4.1
defense-1.21-0.4.1.jar
30 Aug 2024
1.21-0.4.0
defense-1.21-0.4.0.jar
29 Aug 2024
1.21-0.3.0
defense-1.21-0.3.0.jar
25 Aug 2024
1.21-0.3.0-BETA1
defense-1.21-0.3.0-BETA1.jar
22 Aug 2024
1.21-0.2.0
defense-1.21-0.2.0.jar
14 Aug 2024
1.21-0.1.6
defense-1.21-0.1.6.jar
5 Aug 2024
1.21-0.1.5
defense-1.21-0.1.5.jar
3 Aug 2024
Looking for an older file? The official Modrinth project page is in Resources.