Package org.bukkit.event.entity
Enum Class CreatureSpawnEvent.SpawnReason
java.lang.Object
java.lang.Enum<CreatureSpawnEvent.SpawnReason>
org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason
- All Implemented Interfaces:
- Serializable,- Comparable<CreatureSpawnEvent.SpawnReason>,- Constable
- Enclosing class:
- CreatureSpawnEvent
An enum to specify the type of spawning
- 
Nested Class SummaryNested classes/interfaces inherited from class java.lang.EnumEnum.EnumDesc<E extends Enum<E>>
- 
Enum Constant SummaryEnum ConstantsEnum ConstantDescriptionWhen a bee is released from a beehive/bee nestWhen an entity breeds to create a child, this also include Shulker and AllayWhen an iron golem is spawned by being builtWhen a snowman is spawned by being builtWhen a wither boss is spawned by being builtDeprecated.no longer called, chunks are generated with entities already existing.When a creature is spawned by the "/summon" commandWhen a villager is cured from infectionWhen a creature is spawned by pluginsWhen an entity is missing a SpawnReasonWhen a creature is spawned by a dispenser dispensing an eggWhen a creature is spawned by another entity drowningWhen an Allay duplicate itselfWhen a creature spawns from an eggWhen an entity is spawned as a result of ender pearl usageWhen an entity is spawned as a result of an explosion.When an entity is shaking in Powder Snow and a new entity spawns.When a zombie infects a villagerWhen an entity spawns as a jockey of another entity (mostly spider jockeys)When a creature spawns because of a lightning strikeWhen a tadpole converts to a frogWhen an entity spawns as a mount of another entity (mostly chicken jockeys)When something spawns from natural meansWhen a creature is spawned by nether portalWhen an ocelot has a baby spawned along with themWhen an entity is spawned as part of a patrolWhen a piglin is converted to a zombified piglin.When an entity is spawned as part of a raidWhen an entity calls for reinforcementsWhen a cow is spawned by shearing a mushroom cowWhen an entity is spawned as a result of the entity it is being perched on jumping or being damagedWhen a silverfish spawns from a blockWhen a slime splitsWhen a creature spawns from a spawnerWhen a creature spawns from a Spawner EggWhen an entity is created by a cast spell.When an entity spawns as a trap for players approachingWhen an iron golem is spawned to defend a villageWhen a zombie is spawned to invade a village
- 
Method SummaryModifier and TypeMethodDescriptionReturns the enum constant of this class with the specified name.static CreatureSpawnEvent.SpawnReason[]values()Returns an array containing the constants of this enum class, in the order they are declared.
- 
Enum Constant Details- 
NATURALWhen something spawns from natural means
- 
JOCKEYWhen an entity spawns as a jockey of another entity (mostly spider jockeys)
- 
CHUNK_GENDeprecated.no longer called, chunks are generated with entities already existing. Consider usingChunkLoadEvent,ChunkLoadEvent.isNewChunk()andChunk.getEntities()for similar effect.When a creature spawns due to chunk generation
- 
SPAWNERWhen a creature spawns from a spawner
- 
EGGWhen a creature spawns from an egg
- 
SPAWNER_EGGWhen a creature spawns from a Spawner Egg
- 
LIGHTNINGWhen a creature spawns because of a lightning strike
- 
BUILD_SNOWMANWhen a snowman is spawned by being built
- 
BUILD_IRONGOLEMWhen an iron golem is spawned by being built
- 
BUILD_WITHERWhen a wither boss is spawned by being built
- 
VILLAGE_DEFENSEWhen an iron golem is spawned to defend a village
- 
VILLAGE_INVASIONWhen a zombie is spawned to invade a village
- 
BREEDINGWhen an entity breeds to create a child, this also include Shulker and Allay
- 
SLIME_SPLITWhen a slime splits
- 
REINFORCEMENTSWhen an entity calls for reinforcements
- 
NETHER_PORTALWhen a creature is spawned by nether portal
- 
DISPENSE_EGGWhen a creature is spawned by a dispenser dispensing an egg
- 
INFECTIONWhen a zombie infects a villager
- 
CUREDWhen a villager is cured from infection
- 
OCELOT_BABYWhen an ocelot has a baby spawned along with them
- 
SILVERFISH_BLOCKWhen a silverfish spawns from a block
- 
MOUNTWhen an entity spawns as a mount of another entity (mostly chicken jockeys)
- 
TRAPWhen an entity spawns as a trap for players approaching
- 
ENDER_PEARLWhen an entity is spawned as a result of ender pearl usage
- 
SHOULDER_ENTITYWhen an entity is spawned as a result of the entity it is being perched on jumping or being damaged
- 
DROWNEDWhen a creature is spawned by another entity drowning
- 
SHEAREDWhen a cow is spawned by shearing a mushroom cow
- 
EXPLOSIONWhen an entity is spawned as a result of an explosion. Like an area effect cloud from a creeper or a dragon fireball.
- 
RAIDWhen an entity is spawned as part of a raid
- 
PATROLWhen an entity is spawned as part of a patrol
- 
BEEHIVEWhen a bee is released from a beehive/bee nest
- 
PIGLIN_ZOMBIFIEDWhen a piglin is converted to a zombified piglin.
- 
SPELLWhen an entity is created by a cast spell.
- 
FROZENWhen an entity is shaking in Powder Snow and a new entity spawns.
- 
METAMORPHOSISWhen a tadpole converts to a frog
- 
DUPLICATIONWhen an Allay duplicate itself
- 
COMMANDWhen a creature is spawned by the "/summon" command
- 
CUSTOMWhen a creature is spawned by plugins
- 
DEFAULTWhen an entity is missing a SpawnReason
 
- 
- 
Method Details- 
valuesReturns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
 
- 
valueOfReturns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
- name- the name of the enum constant to be returned.
- Returns:
- the enum constant with the specified name
- Throws:
- IllegalArgumentException- if this enum class has no constant with the specified name
- NullPointerException- if the argument is null
 
 
-