summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndrew Ardill <andrew.ardill@gmail.com>2012-01-09 10:46:07 +1100
committerAndrew Ardill <andrew.ardill@gmail.com>2012-01-09 10:46:07 +1100
commit67dbe71bd92bce7014c271e711bac4ae6002de3f (patch)
tree25bca7695b4b1052398150cf77721275d5001fb0 /src
parent93aed40c4f82a2fb1cf4436c7a75c5622197d539 (diff)
downloadcraftbukkit-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.java2
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());
}