diff options
author | EvilSeph <evilseph@gmail.com> | 2012-03-15 18:42:30 -0400 |
---|---|---|
committer | EvilSeph <evilseph@gmail.com> | 2012-03-15 18:48:44 -0400 |
commit | 42822ddca4f99fc5b5296b26ed7367f4bdb26318 (patch) | |
tree | 16cfe1a68e95fea127930538bfef8349ccf42ccf /src | |
parent | 92f771a022593c0b10349f2096b4d892e93f7807 (diff) | |
download | craftbukkit-42822ddca4f99fc5b5296b26ed7367f4bdb26318.tar craftbukkit-42822ddca4f99fc5b5296b26ed7367f4bdb26318.tar.gz craftbukkit-42822ddca4f99fc5b5296b26ed7367f4bdb26318.tar.lz craftbukkit-42822ddca4f99fc5b5296b26ed7367f4bdb26318.tar.xz craftbukkit-42822ddca4f99fc5b5296b26ed7367f4bdb26318.zip |
Re-added EntityCombust event to skeletons. Fixes BUKKIT-1188
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/net/minecraft/server/EntitySkeleton.java | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/main/java/net/minecraft/server/EntitySkeleton.java b/src/main/java/net/minecraft/server/EntitySkeleton.java index d054c93a..58a15bde 100644 --- a/src/main/java/net/minecraft/server/EntitySkeleton.java +++ b/src/main/java/net/minecraft/server/EntitySkeleton.java @@ -1,12 +1,5 @@ package net.minecraft.server; -// CraftBukkit start -import org.bukkit.craftbukkit.event.CraftEventFactory; -import org.bukkit.event.entity.EntityShootBowEvent; -import org.bukkit.event.entity.EntityCombustEvent; -import org.bukkit.event.entity.EntityDeathEvent; -// CraftBukkit end - public class EntitySkeleton extends EntityMonster { private static final ItemStack a = new ItemStack(Item.BOW, 1); @@ -55,7 +48,14 @@ public class EntitySkeleton extends EntityMonster { float f = this.b(1.0F); if (f > 0.5F && this.world.isChunkLoaded(MathHelper.floor(this.locX), MathHelper.floor(this.locY), MathHelper.floor(this.locZ)) && this.random.nextFloat() * 30.0F < (f - 0.4F) * 2.0F) { - this.setOnFire(8); + // CraftBukkit start + org.bukkit.event.entity.EntityCombustEvent event = new org.bukkit.event.entity.EntityCombustEvent(this.getBukkitEntity(), 8); + this.world.getServer().getPluginManager().callEvent(event); + + if (!event.isCancelled()) { + this.setOnFire(event.getDuration()); + } + // CraftBukkit end } } |