A stone-sword-styled blade that hits like a mace, with a "sword in the stone" discovery event and a lightning smash.
Built against the Paper 1.21.11 API and Java 21, so one jar covers:
- Minecraft 1.21 → 26.1.2 and newer on Paper (and Paper forks: Purpur, Pufferfish…).
- Runs on Java 21+ servers, including the Java 25 that Paper 26.1 needs.
Floor is 1.21. The Mace, its enchantments (Density / Breach / Wind Burst) and the mace-smash sound were only added in Minecraft 1.21, so the plugin cannot run on 1.20.x or lower — those APIs simply don't exist there.
mvn clean packageOutput: target/HeavySword-1.0.0.jar → drop into your server's plugins/ folder.
/heavysword (alias /hs), permission heavysword.admin (default: OP):
| Command | Effect |
|---|---|
/heavysword start |
Spawns the sword-in-stone at a random surface spot near world spawn. Only one can exist at a time. |
/heavysword give |
Puts a Heavy Sword directly in your inventory. |
/heavysword paste |
Builds a sword-in-stone structure at your feet (no single-instance limit). |
- Looks like a stone sword, unbreakable, keeps fast sword attack speed.
- Bypasses mace-cooldown plugins automatically — those key off the
MACEitem, and this is aSTONE_SWORD, so they never touch it. - Smash attack: fall more than 1.5 blocks onto a target while holding it to deal mace-style bonus damage. Each smash strikes the victim with a visual-only lightning bolt — no fire, no extra damage, so kill loot never burns and the attacker is never hurt by their own lightning.
- Your fall damage is cancelled when you land a smash, like a real mace.
- Enchantable with both sword and mace enchantments:
- Sword enchants (Sharpness, etc.) work normally via enchanting table or anvil.
- Mace enchants (Density, Breach, Wind Burst) can be applied in an anvil using an enchanted book — the sword accepts any enchant from a book.
- Starts with no enchantments.
- Mace enchantments are functional on the smash:
- Density — extra damage per level, per block fallen.
- Breach — cuts through the target's armour (adds back ~15% of the armour's reduction per level).
- Wind Burst — launches the attacker upward on a smash so smashes can be chained, with wind particles and sound.
- Half the glowing blade sticks out of a small rock pile.
- Punch it 3–5 times (randomised) to knock it loose, then pick it up.
- Glows while stuck and whenever it lies on the ground as a dropped item.
- The dropped sword is immune to lava, fire and explosions, and never despawns.
- You can't right-click the sword out of the stone — you must punch it free.
sword-in-stone:
min-distance: 60 # how far from world spawn "/hs start" places the rock
max-distance: 300
min-hits: 3 # punches needed to free the sword (random in range)
max-hits: 5
smash:
min-fall-distance: 1.5 # blocks fallen before an attack counts as a smash
lightning: true # strike the smashed target with visual lightningValues are read on server start, so reload/restart after editing.
- Breach is an approximation. It adds damage based on the target's armour attribute rather than reproducing Minecraft's exact armour + toughness formula, so the numbers are close but not byte-for-byte vanilla.
- Mace enchants can't be offered by an enchanting table for a sword, so use an anvil + enchanted book for those.
/heavysword start's "only one exists" rule counts any sword-in-stone, including pasted ones. Remove the existing one before starting a new event.
Tune the blade angle in the rock via ARM_POSE in SwordInStoneManager.java.