Bukkit/CraftBukkit — pull request #1354 by kenzierocks (2014-03-15 17:59:29+00:00)
Title: [B+C] Add EntitySpawnEvent. Adds Bukkit-1559

##### The Issue: #####
Most entity spawns cannot be tracked with events, and polling is required to track new entities.
##### Justification: #####
Polling the server with background loops is heavy on performance. The proper way to check for spawning in Bukkit is through CreatureSpawnEvent, but this only handles LivingEntity.
##### PR Breakdown: #####
Adds a new event called EntitySpawnEvent, which tracks all entity spawns not already handled by events (LivingEntity, Item, and Projectile). This hooks at the same spot as CreatureSpawnEvent, and re-uses it's SpawnReason class for minimal changes to addEntity.
##### Testing: #####
Test plugin here: https://github.com/kenzierocks/TestPluginBukkit1559/
It tracks all entity spawns via the new event, and logs them to the console. Use /cancel-spawns to toggle canceling the event.
##### Relevant PRs: #####
--working on it--
##### Ticket: #####
https://bukkit.atlassian.net/browse/BUKKIT-1559