From 21b8ff719e35dfec381c304cbc771e238025174d Mon Sep 17 00:00:00 2001 From: Kodekpl Date: Wed, 21 Aug 2013 15:41:58 +0200 Subject: 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. --- src/main/java/org/bukkit/event/entity/CreatureSpawnEvent.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main/java/org/bukkit/event/entity/CreatureSpawnEvent.java b/src/main/java/org/bukkit/event/entity/CreatureSpawnEvent.java index 3055ea77..46b82622 100644 --- a/src/main/java/org/bukkit/event/entity/CreatureSpawnEvent.java +++ b/src/main/java/org/bukkit/event/entity/CreatureSpawnEvent.java @@ -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 */ -- cgit v1.2.3