[SPIGOT-1672] SpawnerSpawnEvent is broken in 1.9 Created: 03/Mar/16 Updated: 03/Mar/16 Resolved: 03/Mar/16 |
|
| Status: | Resolved |
| Project: | Spigot |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor |
| Reporter: | Andrew Huang | Assignee: | Unassigned |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | 1.9, bug, event | ||
| Description |
|
Tested a simple plugin that logs then destroys mob spawners when mobs are spawned from them. The listener method is called successfully when a mob is spawned in version 1.8 but not in 1.9. |
| Comments |
| Comment by Andrew Huang [ 03/Mar/16 ] |
|
CreatureSpawnEvent does not have a method to return CreatureSpawner afaik. SpawnerSpawnEvent has getSpawner() for that. A workaround may be to scan the surrounding blocks for a mobspawner, but that would be less efficient than just using SpawnerSpawnEvent.getSpawner(). |
| Comment by md_5 [ 03/Mar/16 ] |
|
Known. I couldn't figure out why we have this and also CreatureSpawnEvent with Spawnreason of MOB_SPAWN. Care to let me know if this is a suitable replacement? |