From 9ff882c5263ed88c4b7a43ec464f154c2b4c2c19 Mon Sep 17 00:00:00 2001 From: Georgiy Date: Sun, 30 Jun 2013 20:49:34 -0400 Subject: [PATCH] Added check for breeding before preventing sheep event --- src/gibstick/bukkit/discosheep/SheepDeshearer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gibstick/bukkit/discosheep/SheepDeshearer.java b/src/gibstick/bukkit/discosheep/SheepDeshearer.java index 607cfd3..ced3527 100644 --- a/src/gibstick/bukkit/discosheep/SheepDeshearer.java +++ b/src/gibstick/bukkit/discosheep/SheepDeshearer.java @@ -35,7 +35,7 @@ public class SheepDeshearer implements Listener { @EventHandler public void onCreatureSpawn(CreatureSpawnEvent e){ - if(e.getEntity() instanceof Sheep){ + if(e.getEntity() instanceof Sheep && e.getSpawnReason().equals(CreatureSpawnEvent.SpawnReason.BREEDING)){ for(DiscoParty party : parent.getParties()){ if(party.getSheep().contains((Sheep)e.getEntity())){ e.setCancelled(true);