Anvils are no longer damaged
What does it ?
This is a very simple Plugin. The only thing it do is to disable the damage Anvils get.
No Commands
No Permssions
- Suggestions ?
Source Code:
Code (Text):
@EventHandler (priority = EventPriority.HIGH)
public void on(PlayerInteractEvent e) {
if(e.getClickedBlock().getType() == Material.ANVIL && e.getAction() == Action.RIGHT_CLICK_BLOCK) {
Block b = (Block) e.getClickedBlock();
if(b.getData() >= 4 && b.getData() < 11) {
if(b.getData() == 4) {b.setData((byte) 0);}
if(b.getData() == 5) {b.setData((byte) 1);}
if(b.getData() == 6) {b.setData((byte) 2);}
if(b.getData() == 7) {b.setData((byte) 3);}
if(b.getData() == 8) {b.setData((byte) 0);}
if(b.getData() == 9) {b.setData((byte) 1);}
if(b.getData() == 10) {b.setData((byte) 2);}
if(b.getData() == 11) {b.setData((byte) 3);}
}
}
}
public void on(PlayerInteractEvent e) {
if(e.getClickedBlock().getType() == Material.ANVIL && e.getAction() == Action.RIGHT_CLICK_BLOCK) {
Block b = (Block) e.getClickedBlock();
if(b.getData() >= 4 && b.getData() < 11) {
if(b.getData() == 4) {b.setData((byte) 0);}
if(b.getData() == 5) {b.setData((byte) 1);}
if(b.getData() == 6) {b.setData((byte) 2);}
if(b.getData() == 7) {b.setData((byte) 3);}
if(b.getData() == 8) {b.setData((byte) 0);}
if(b.getData() == 9) {b.setData((byte) 1);}
if(b.getData() == 10) {b.setData((byte) 2);}
if(b.getData() == 11) {b.setData((byte) 3);}
}
}
}
![[IMG]](https://www.spigotmc.org/data/attachments/205/205343-0df42540e55b86be7912a822b3f6fe1f.jpg)
Quick facts
- Edition: Minecraft Java
- File type: .jar
- Minecraft versions listed: 1.8, 1.9, 1.10
- How to install: Install the matching mod loader (Forge, Fabric or NeoForge) for your Minecraft version. → Download the .jar. → Put it in the .minecraft/mods folder and launch that loader profile.
- Where to get it: Opens on Spigot — not every file is mirrored on our own servers.
Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.
NoAnvilDamage - Remove Anvil Damage is a free Minecraft Java mod. Compatible with Minecraft 1.8, 1.9, 1.10, 1.11. Downloaded 337 times (via Spigot). Download it and open it directly in the game.