From 42822ddca4f99fc5b5296b26ed7367f4bdb26318 Mon Sep 17 00:00:00 2001 From: EvilSeph Date: Thu, 15 Mar 2012 18:42:30 -0400 Subject: [PATCH] Re-added EntityCombust event to skeletons. Fixes BUKKIT-1188 --- .../net/minecraft/server/EntitySkeleton.java | 16 ++++++++-------- 1 file 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 d054c93ae8..58a15bde33 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 } }