diff options
author | GJ <gjmcferrin@gmail.com> | 2014-03-27 08:27:59 -0400 |
---|---|---|
committer | Travis Watkins <amaranth@ubuntu.com> | 2014-04-18 09:01:11 -0500 |
commit | d4fe10394a2105f22e5bd2b519fb596fcaacd801 (patch) | |
tree | 5adc7d3298dab7714a3777afc37a82f032ef3aa2 /src/main/java/net/minecraft/server/EntityMonster.java | |
parent | 286c71329d25b6646e4da932ca6723a056b152cf (diff) | |
download | craftbukkit-d4fe10394a2105f22e5bd2b519fb596fcaacd801.tar craftbukkit-d4fe10394a2105f22e5bd2b519fb596fcaacd801.tar.gz craftbukkit-d4fe10394a2105f22e5bd2b519fb596fcaacd801.tar.lz craftbukkit-d4fe10394a2105f22e5bd2b519fb596fcaacd801.tar.xz craftbukkit-d4fe10394a2105f22e5bd2b519fb596fcaacd801.zip |
[Bleeding] Add many missing event calls.
Diffstat (limited to 'src/main/java/net/minecraft/server/EntityMonster.java')
-rw-r--r-- | src/main/java/net/minecraft/server/EntityMonster.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/main/java/net/minecraft/server/EntityMonster.java b/src/main/java/net/minecraft/server/EntityMonster.java index 6e02e2a5..d13a91e4 100644 --- a/src/main/java/net/minecraft/server/EntityMonster.java +++ b/src/main/java/net/minecraft/server/EntityMonster.java @@ -1,5 +1,6 @@ package net.minecraft.server; +import org.bukkit.event.entity.EntityCombustByEntityEvent; import org.bukkit.event.entity.EntityTargetEvent; // CraftBukkit public abstract class EntityMonster extends EntityCreature implements IMonster { @@ -108,7 +109,14 @@ public abstract class EntityMonster extends EntityCreature implements IMonster { int j = EnchantmentManager.getFireAspectEnchantmentLevel(this); if (j > 0) { - entity.setOnFire(j * 4); + // CraftBukkit start - Call a combust event when somebody hits with a fire enchanted item + EntityCombustByEntityEvent combustEvent = new EntityCombustByEntityEvent(this.getBukkitEntity(), entity.getBukkitEntity(), j * 4); + org.bukkit.Bukkit.getPluginManager().callEvent(combustEvent); + + if (!combustEvent.isCancelled()) { + entity.setOnFire(combustEvent.getDuration()); + } + // CraftBukkit end } if (entity instanceof EntityLiving) { |