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/ItemBow.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/ItemBow.java')
-rw-r--r-- | src/main/java/net/minecraft/server/ItemBow.java | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/main/java/net/minecraft/server/ItemBow.java b/src/main/java/net/minecraft/server/ItemBow.java index b3472dd1..a1bf31af 100644 --- a/src/main/java/net/minecraft/server/ItemBow.java +++ b/src/main/java/net/minecraft/server/ItemBow.java @@ -1,5 +1,7 @@ package net.minecraft.server; +import org.bukkit.event.entity.EntityCombustEvent; // CraftBukkit + public class ItemBow extends Item { public static final String[] a = new String[] { "pulling_0", "pulling_1", "pulling_2"}; @@ -45,7 +47,14 @@ public class ItemBow extends Item { } if (EnchantmentManager.getEnchantmentLevel(Enchantment.ARROW_FIRE.id, itemstack) > 0) { - entityarrow.setOnFire(100); + // CraftBukkit start - call EntityCombustEvent + EntityCombustEvent event = new EntityCombustEvent(entityarrow.getBukkitEntity(), 100); + entityarrow.world.getServer().getPluginManager().callEvent(event); + + if (!event.isCancelled()) { + entityarrow.setOnFire(event.getDuration()); + } + // CraftBukkit end } // CraftBukkit start |