Added SpawnReasons for nether portals and dispensers. Fixes BUKKIT-3148

Previously any entities spawned through dispensers (monster eggs) or
by nether portals were given the incorrect SpawnReason of SPAWNER_EGG.
This made it impossible to distinguish what exactly happened in regards
to the creature being spawned.

With the additional two SpawnReasons, plugins can identify sources of
creature spawning more easily and accuratly.
This commit is contained in:
Kodekpl 2013-08-21 15:41:58 +02:00 committed by turt2live
parent cd783276fb
commit 21b8ff719e

View file

@ -154,6 +154,14 @@ public class CreatureSpawnEvent extends EntityEvent implements Cancellable {
* When an entity calls for reinforcements
*/
REINFORCEMENTS,
/**
* When a creature is spawned by nether portal
*/
NETHER_PORTAL,
/**
* When a creature is spawned by a dispenser dispensing an egg
*/
DISPENSE_EGG,
/**
* When a creature is spawned by plugins
*/