From 67dbe71bd92bce7014c271e711bac4ae6002de3f Mon Sep 17 00:00:00 2001 From: Andrew Ardill Date: Mon, 9 Jan 2012 10:46:07 +1100 Subject: Fix calling CombustEvent caused by enchantment The CombustEvent created when an Entity attacks with a fire enchanted weapon was never raised through the plugin manager. Thanks for pointing it out EdGruberman! --- src/main/java/net/minecraft/server/EntityHuman.java | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java index 24221ada..bb84236b 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java @@ -844,6 +844,8 @@ public abstract class EntityHuman extends EntityLiving { if (l > 0) { // CraftBukkit start - raise a combust event when somebody hits with a fire enchanted item EntityCombustByEntityEvent combustEvent = new EntityCombustByEntityEvent(this.getBukkitEntity(), entity.getBukkitEntity(), l*4); + Bukkit.getPluginManager().callEvent(combustEvent); + if (!combustEvent.isCancelled()) { entity.setOnFire(combustEvent.getDuration()); } -- cgit v1.2.3