Vanilla Sword Blocking
This is a very simple datapack/paper plugin that brings back the old sword blocking mechanics, allowing you to block with your sword to reduce the damage you take. The best part about it: It's server-only, so players don't even have to install a mod on their client for this - just add it to the server and it works for everyone!
Features:
- damage is reduced by 50% while blocking with swords
- player is slowed down while blocking
- works with all swords, no matter how they were obtained
- works with most modded swords
Caveat:
- When using the datapack/mod variant (1.21.5+), sword blocking will keep working even when you remove the datapack/mod!
How it works
Essentialy, this plugin uses the recently added component called "consumable", to make Minecraft think you can eat swords!
This is used to enable an animation called "block", so it looks like you're blocking.
Then, the plugin prevents you from actually eating your sword (you're welcome!), and instead reduces damage when it detects you are blocking ("eating", from minecraft's perspective) your sword.

Note:
While the plugin variant can technichally be installed on any server version 1.21.2 and later, the blocking will only be displayed correctly by clients on version 1.21.4 (24w44a, to be exact) and later.
How to Install Vanilla Sword Blocking (Datapack)
Vanilla Sword Blocking by Player005 is verified for Bukkit, Datapack, Fabric, Folia, Forge, Neoforge, Paper, Quilt, Spigot across Minecraft versions 1.21.10, 1.21.4, 1.21.4-pre1, 1.21.4-pre2, 1.21.4-pre3, 1.21.4-rc1, 1.21.4-rc2, 1.21.4-rc3 (latest release: d1.0.0+mod, file size: 5 KB). Follow the steps below to install it safely from ModCraft.tv:
- Click the Download button above and select your Minecraft version (1.21.10, 1.21.4, 1.21.4-pre1, 1.21.4-pre2, 1.21.4-pre3, 1.21.4-rc1, 1.21.4-rc2, 1.21.4-rc3) and platform (Bukkit, Datapack, Fabric, Folia, Forge, Neoforge, Paper, Quilt, Spigot).
- Make sure you have the compatible loader or environment installed for Bukkit, Datapack, Fabric, Folia, Forge, Neoforge, Paper, Quilt, Spigot.
- Move the downloaded Vanilla Sword Blocking file into your Minecraft
.minecraft/saves/<world>/datapacksfolder and launch the game.
All Versions
+ Add Version- Fix folia compatibility
- Fix possible error messages in console