--- a/net/minecraft/world/entity/projectile/WitherSkull.java
+++ b/net/minecraft/world/entity/projectile/WitherSkull.java
@@ -19,8 +19,10 @@
 import net.minecraft.world.level.material.FluidState;
 import net.minecraft.world.phys.EntityHitResult;
 import net.minecraft.world.phys.HitResult;
+import org.bukkit.event.entity.ExplosionPrimeEvent; // CraftBukkit
 
 public class WitherSkull extends AbstractHurtingProjectile {
+
     private static final EntityDataAccessor<Boolean> DATA_DANGEROUS = SynchedEntityData.defineId(WitherSkull.class, EntityDataSerializers.BOOLEAN);
 
     public WitherSkull(EntityType<? extends WitherSkull> type, Level world) {
@@ -51,32 +53,35 @@
         super.onHitEntity(entityHitResult);
         if (!this.level.isClientSide) {
             Entity entity = entityHitResult.getEntity();
-            Entity entity2 = this.getOwner();
-            boolean bl;
-            if (entity2 instanceof LivingEntity) {
-                LivingEntity livingEntity = (LivingEntity)entity2;
-                bl = entity.hurt(DamageSource.witherSkull(this, livingEntity), 8.0F);
-                if (bl) {
+            Entity entity1 = this.getOwner();
+            boolean flag;
+
+            if (entity1 instanceof LivingEntity) {
+                LivingEntity entityliving = (LivingEntity) entity1;
+
+                flag = entity.hurt(DamageSource.witherSkull(this, entityliving), 8.0F);
+                if (flag) {
                     if (entity.isAlive()) {
-                        this.doEnchantDamageEffects(livingEntity, entity);
+                        this.doEnchantDamageEffects(entityliving, entity);
                     } else {
-                        livingEntity.heal(5.0F);
+                        entityliving.heal(5.0F, org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason.WITHER); // CraftBukkit
                     }
                 }
             } else {
-                bl = entity.hurt(DamageSource.MAGIC, 5.0F);
+                flag = entity.hurt(DamageSource.MAGIC, 5.0F);
             }
 
-            if (bl && entity instanceof LivingEntity) {
-                int i = 0;
+            if (flag && entity instanceof LivingEntity) {
+                byte b0 = 0;
+
                 if (this.level.getDifficulty() == Difficulty.NORMAL) {
-                    i = 10;
+                    b0 = 10;
                 } else if (this.level.getDifficulty() == Difficulty.HARD) {
-                    i = 40;
+                    b0 = 40;
                 }
 
-                if (i > 0) {
-                    ((LivingEntity)entity).addEffect(new MobEffectInstance(MobEffects.WITHER, 20 * i, 1), this.getEffectSource());
+                if (b0 > 0) {
+                    ((LivingEntity) entity).addEffect(new MobEffectInstance(MobEffects.WITHER, 20 * b0, 1), this.getEffectSource(), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.ATTACK); // CraftBukkit
                 }
             }
 
@@ -87,7 +92,15 @@
     protected void onHit(HitResult hitResult) {
         super.onHit(hitResult);
         if (!this.level.isClientSide) {
-            this.level.explode(this, this.getX(), this.getY(), this.getZ(), 1.0F, false, Level.ExplosionInteraction.MOB);
+            // CraftBukkit start
+            // this.level.explode(this, this.getX(), this.getY(), this.getZ(), 1.0F, false, World.a.MOB);
+            ExplosionPrimeEvent event = new ExplosionPrimeEvent(this.getBukkitEntity(), 1.0F, false);
+            this.level.getCraftServer().getPluginManager().callEvent(event);
+
+            if (!event.isCancelled()) {
+                this.level.explode(this, this.getX(), this.getY(), this.getZ(), event.getRadius(), event.getFire(), Level.ExplosionInteraction.MOB);
+            }
+            // CraftBukkit end
             this.discard();
         }
 
@@ -105,15 +118,15 @@
 
     @Override
     protected void defineSynchedData() {
-        this.entityData.define(DATA_DANGEROUS, false);
+        this.entityData.define(WitherSkull.DATA_DANGEROUS, false);
     }
 
     public boolean isDangerous() {
-        return this.entityData.get(DATA_DANGEROUS);
+        return (Boolean) this.entityData.get(WitherSkull.DATA_DANGEROUS);
     }
 
     public void setDangerous(boolean charged) {
-        this.entityData.set(DATA_DANGEROUS, charged);
+        this.entityData.set(WitherSkull.DATA_DANGEROUS, charged);
     }
 
     @Override
