mirror of
https://github.com/barkeser2002/CatServer.git
synced 2026-09-25 09:26:08 +03:00
46 lines
1.5 KiB
Diff
46 lines
1.5 KiB
Diff
--- ../src-base/minecraft/net/minecraft/entity/monster/EntitySkeleton.java
|
|
+++ ../src-work/minecraft/net/minecraft/entity/monster/EntitySkeleton.java
|
|
@@ -2,6 +2,9 @@
|
|
|
|
import java.util.Calendar;
|
|
import javax.annotation.Nullable;
|
|
+
|
|
+import org.bukkit.event.entity.EntityCombustEvent;
|
|
+
|
|
import net.minecraft.block.Block;
|
|
import net.minecraft.enchantment.EnchantmentHelper;
|
|
import net.minecraft.entity.Entity;
|
|
@@ -182,7 +185,14 @@
|
|
|
|
if (flag)
|
|
{
|
|
- this.setFire(8);
|
|
+ // CraftBukkit start
|
|
+ EntityCombustEvent event = new EntityCombustEvent(this.getBukkitEntity(), 8);
|
|
+ this.worldObj.getServer().getPluginManager().callEvent(event);
|
|
+
|
|
+ if (!event.isCancelled()) {
|
|
+ this.setFire(event.getDuration());
|
|
+ }
|
|
+ // CraftBukkit end
|
|
}
|
|
}
|
|
}
|
|
@@ -208,7 +218,7 @@
|
|
|
|
public void onDeath(DamageSource cause)
|
|
{
|
|
- super.onDeath(cause);
|
|
+ //super.onDeath(cause); // CraftBukkit
|
|
|
|
if (cause.getSourceOfDamage() instanceof EntityArrow && cause.getEntity() instanceof EntityPlayer)
|
|
{
|
|
@@ -226,6 +236,7 @@
|
|
((EntityCreeper)cause.getEntity()).incrementDroppedSkulls();
|
|
this.entityDropItem(new ItemStack(Items.SKULL, 1, this.getSkeletonType() == SkeletonType.WITHER ? 1 : 0), 0.0F);
|
|
}
|
|
+ super.onDeath(cause); // CraftBukkit - moved from above
|
|
}
|
|
|
|
@Nullable
|