summaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authorKodekpl <Kodekgames@gmail.com>2013-08-21 15:41:58 +0200
committerturt2live <travpc@gmail.com>2014-02-01 22:08:48 -0700
commit21b8ff719e35dfec381c304cbc771e238025174d (patch)
tree04fbde92ca004d8891644e434fd0467ceb9ee79e /src/main
parentcd783276fb21579b313a6da44c9cf07846277368 (diff)
downloadbukkit-21b8ff719e35dfec381c304cbc771e238025174d.tar
bukkit-21b8ff719e35dfec381c304cbc771e238025174d.tar.gz
bukkit-21b8ff719e35dfec381c304cbc771e238025174d.tar.lz
bukkit-21b8ff719e35dfec381c304cbc771e238025174d.tar.xz
bukkit-21b8ff719e35dfec381c304cbc771e238025174d.zip
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.
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/org/bukkit/event/entity/CreatureSpawnEvent.java8
1 files changed, 8 insertions, 0 deletions
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
@@ -155,6 +155,14 @@ public class CreatureSpawnEvent extends EntityEvent implements Cancellable {
*/
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
*/
CUSTOM,