-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
None
-
None
-
3092-Spigot-9fb885e-ebe18b9
-
Yes
This might be controversial whether it is a bug or a feature - decided to report anyway.
When cancelling the EntityBreedEvent, it keeps firing again. What is more, when it's called and cancelled, it seems to fire immediately again (probably with swapped parents). Resetting love ticks should solve both issues.
If it's considered a feature, a mention in JavaDocs would be nice.
Repro:
core.event('org.bukkit.event.entity.EntityBreedEvent', (event) => { event.setCancelled(true); global.server.broadcastMessage(`Cancelled entity breed event`); });
Logs (notice 2 messages in the same second):
[18:10:36] [Server thread/INFO]: Cancelled entity breed event [18:10:36] [Server thread/INFO]: Cancelled entity breed event [18:10:39] [Server thread/INFO]: Cancelled entity breed event [18:10:39] [Server thread/INFO]: Cancelled entity breed event [18:10:42] [Server thread/INFO]: Cancelled entity breed event [18:10:42] [Server thread/INFO]: Cancelled entity breed event [18:10:45] [Server thread/INFO]: Cancelled entity breed event [18:10:45] [Server thread/INFO]: Cancelled entity breed event [18:10:48] [Server thread/INFO]: Cancelled entity breed event [18:10:48] [Server thread/INFO]: Cancelled entity breed event [18:10:51] [Server thread/INFO]: Cancelled entity breed event [18:10:51] [Server thread/INFO]: Cancelled entity breed event [18:10:54] [Server thread/INFO]: Cancelled entity breed event [18:10:54] [Server thread/INFO]: Cancelled entity breed event
Downstream issue: https://github.com/PaperMC/Paper/issues/5444