Other than listening on the PlayerInteractEvent and checking held items, is there a way to stop players from breeding mobs together? Can this be achieved solely with the Bukkit API?
lol768 there is an animal spawn event, which has a spawnReason, one being breeding. http://jd.bukkit.org/rb/apidocs/org/bukkit/event/entity/CreatureSpawnEvent.SpawnReason.html#BREEDING or entityMakeLoveEvent, I believe they're both cancel able lol768 I advise listening for entity love, and cancelling it as you don't want them making love then no baby, unless you intend on using love as a feature of your plugin, hope I helped EDIT by Moderator: merged posts, please use the edit button instead of double posting.
I believe the only way is doing what Samthelord1 said. See: http://forums.bukkit.org/threads/disabling-breeding-of-a-certain-mob.168026/
chasechocolate personally, I advise not using that, but using the love event, or it could look somewhat unprofessional, or possibly listening for both, maybe the love cancels the hearts but not baby? I'm not sure, but I think love will cancel spawning from it aswell as the hearts.
Samthelord1 what's the love event? I think you should just cancel PlayerInteractEntityEvent as cancelling CreatureSpawnEvent can cause memory leaks.
chasechocolate I'm confused, nowhere buy a few topics can I find existence of EntityMakeLoveEvent, looking here, I found that its been deleted? https://forums.bukkit.org/threads/where-is-the-breeding-event.130901/
There is no event that I can find. There is however a PR (but it has not yet been pulled): https://github.com/Bukkit/Bukkit/pull/791 I think the solution Samthelord1 proposed is the best for the job
lol768 yeah, i'd use that, I did some research, there was a EntityMakeLoveEvent but I guess they got rid of it for some reason.