diff --git a/src/main/java/com/gmail/nossr50/listeners/EntityListener.java b/src/main/java/com/gmail/nossr50/listeners/EntityListener.java index 0590b3f23..7b55a40f2 100644 --- a/src/main/java/com/gmail/nossr50/listeners/EntityListener.java +++ b/src/main/java/com/gmail/nossr50/listeners/EntityListener.java @@ -148,6 +148,12 @@ public class EntityListener implements Listener { if (event.getEntity() instanceof ArmorStand) { return; } + + if (event.getDamager().hasMetadata(mcMMO.funfettiMetadataKey)) + { + event.setCancelled(true); + return; + } double damage = event.getFinalDamage(); Entity defender = event.getEntity(); diff --git a/src/main/java/com/gmail/nossr50/mcMMO.java b/src/main/java/com/gmail/nossr50/mcMMO.java index fc5f069e1..1dc5044be 100644 --- a/src/main/java/com/gmail/nossr50/mcMMO.java +++ b/src/main/java/com/gmail/nossr50/mcMMO.java @@ -103,6 +103,7 @@ public class mcMMO extends JavaPlugin { public final static String blockMetadataKey = "mcMMO: Piston Tracking"; public final static String furnaceMetadataKey = "mcMMO: Tracked Furnace"; public final static String tntMetadataKey = "mcMMO: Tracked TNT"; + public final static String funfettiMetadataKey = "mcMMO: Funfetti"; public final static String tntsafeMetadataKey = "mcMMO: Safe TNT"; public final static String customNameKey = "mcMMO: Custom Name"; public final static String customVisibleKey = "mcMMO: Name Visibility";