Discussion in 'Plugin Development' started by ronedri, Mar 10, 2013.
Is there an Animal Breed Event? if not, how can I detect when a player breeds 2 animals?
When an animal breeds to create a child
Thanks, but how can I get the player if I use this:
Is there any chance to get the player in the event: CreatureSpawnEvent ?
So I cant get a player that breeds two animals?
old thread but......
save player info and UUID of animals and compare on breeding event.
Old thread, as you said. No need to bump it just to say that.
My suggestion would be either CreatureSpawnEvent (check the cause), ItemConsumeEvent (check the consumed item), or EntityInteractEntityEvent (check interacted entity).
I had to do something similar once, I think what I did was grab the location of the animal and search for the player closest to them, additional checks such as whether or not the player has food in their hands can help find the breeder in a crowd of people.
Separate names with a comma.