diff options
author | Andrew Ardill <andrew.ardill@gmail.com> | 2012-01-09 10:46:07 +1100 |
---|---|---|
committer | Andrew Ardill <andrew.ardill@gmail.com> | 2012-01-09 10:46:07 +1100 |
commit | 67dbe71bd92bce7014c271e711bac4ae6002de3f (patch) | |
tree | 25bca7695b4b1052398150cf77721275d5001fb0 /src | |
parent | 93aed40c4f82a2fb1cf4436c7a75c5622197d539 (diff) | |
download | craftbukkit-67dbe71bd92bce7014c271e711bac4ae6002de3f.tar craftbukkit-67dbe71bd92bce7014c271e711bac4ae6002de3f.tar.gz craftbukkit-67dbe71bd92bce7014c271e711bac4ae6002de3f.tar.lz craftbukkit-67dbe71bd92bce7014c271e711bac4ae6002de3f.tar.xz craftbukkit-67dbe71bd92bce7014c271e711bac4ae6002de3f.zip |
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!
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/net/minecraft/server/EntityHuman.java | 2 |
1 files changed, 2 insertions, 0 deletions
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()); } |