From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
Date: Tue, 14 Jan 2020 19:43:40 -0600
Subject: [PATCH] Add wither skeleton takes wither damage option


diff --git a/src/main/java/net/minecraft/server/EntitySkeletonWither.java b/src/main/java/net/minecraft/server/EntitySkeletonWither.java
index 1ae9910fefece1a3fe6410b27642da6edd8f296d..c872be77a6cd767520d5412b38ec4ed4fa87ac2f 100644
--- a/src/main/java/net/minecraft/server/EntitySkeletonWither.java
+++ b/src/main/java/net/minecraft/server/EntitySkeletonWither.java
@@ -97,6 +97,6 @@ public class EntitySkeletonWither extends EntitySkeletonAbstract {
 
     @Override
     public boolean d(MobEffect mobeffect) {
-        return mobeffect.getMobEffect() == MobEffects.WITHER ? false : super.d(mobeffect);
+        return (world.purpurConfig.witherSkeletonTakesWitherDamage || mobeffect.getMobEffect() != MobEffects.WITHER) && super.d(mobeffect); // Purpur
     }
 }
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
index bec457e5aac17b0db0788110ceda778c81f26042..d6a95f47c42538b574ec55c0cfffe064b80fdef0 100644
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
@@ -279,6 +279,11 @@ public class PurpurWorldConfig {
         villagerUseBrainTicksOnlyWhenLagging = getBoolean("mobs.villager.use-brain-ticks-only-when-lagging", villagerUseBrainTicksOnlyWhenLagging);
     }
 
+    public boolean witherSkeletonTakesWitherDamage = false;
+    private void witherSkeletonSettings() {
+        witherSkeletonTakesWitherDamage = getBoolean("mobs.wither_skeleton.takes-wither-damage", witherSkeletonTakesWitherDamage);
+    }
+
     public double zombieHorseSpawnChance = 0.0D;
     private void zombieHorseSettings() {
         zombieHorseSpawnChance = getDouble("mobs.zombie_horse.spawn-chance", zombieHorseSpawnChance);
