package uk.co.eluinhost.UltraHardcore.features.core;

import org.bukkit.event.EventHandler;
import org.bukkit.event.entity.CreatureSpawnEvent;
import uk.co.eluinhost.UltraHardcore.features.UHCFeature;

public class WitchSpawnsFeature extends UHCFeature {


    public WitchSpawnsFeature(boolean enabled) {
        super(enabled);
        setFeatureID("WitchSpawns");
        setDescription("Allows natural witch spawns");
    }

    @EventHandler
    public void onCreatureSpawnEvent(CreatureSpawnEvent ese){
        if(!isEnabled()){
            if(ese.getSpawnReason().equals(CreatureSpawnEvent.SpawnReason.NATURAL)){
                ese.setCancelled(true);
            }
        }
    }

    @Override
    public void enableFeature() {

    }

    @Override
    public void disableFeature() {

    }
}

@@ -47,16 +47,53 @@
 .core;%0A%0A
+import org.bukkit.entity.EntityType;%0A
 import o
@@ -647,16 +647,68 @@
 NATURAL)
+&&ese.getEntity().getType().equals(EntityType.WITCH)
 )%7B%0A     

stop only witches spawning naturally in witch feature instead of all mobs