Re-added EntityCombust event to skeletons. Fixes BUKKIT-1188

Dieser Commit ist enthalten in:
EvilSeph 2012-03-15 18:42:30 -04:00
Ursprung 92f771a022
Commit 42822ddca4

Datei anzeigen

@ -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
}
}