Package org.bukkit.event.entity
Enum 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
public static enum CreatureSpawnEvent.SpawnReason extends Enum<CreatureSpawnEvent.SpawnReason>
An enum to specify the type of spawning
-
Nested Class Summary
-
Enum Constant Summary
Enum Constants Enum Constant Description BEEHIVEWhen a bee is released from a beehive/bee nestBREEDINGWhen an animal breeds to create a childBUILD_IRONGOLEMWhen an iron golem is spawned by being builtBUILD_SNOWMANWhen a snowman is spawned by being builtBUILD_WITHERWhen a wither boss is spawned by being builtCHUNK_GENDeprecated.no longer called, chunks are generated with entities already existing.CUREDWhen a villager is cured from infectionCUSTOMWhen a creature is spawned by pluginsDEFAULTWhen an entity is missing a SpawnReasonDISPENSE_EGGWhen a creature is spawned by a dispenser dispensing an eggDROWNEDWhen a creature is spawned by another entity drowningEGGWhen a creature spawns from an eggENDER_PEARLWhen an entity is spawned as a result of ender pearl usageEXPLOSIONWhen eg an effect cloud is spawned as a result of a creeper explodingINFECTIONWhen a zombie infects a villagerJOCKEYWhen an entity spawns as a jockey of another entity (mostly spider jockeys)LIGHTNINGWhen a creature spawns because of a lightning strikeMOUNTWhen an entity spawns as a mount of another entity (mostly chicken jockeys)NATURALWhen something spawns from natural meansNETHER_PORTALWhen a creature is spawned by nether portalOCELOT_BABYWhen an ocelot has a baby spawned along with themPATROLWhen an entity is spawned as part of a patrolRAIDWhen an entity is spawned as part of a raidREINFORCEMENTSWhen an entity calls for reinforcementsSHEAREDWhen an cow is spawned by shearing a mushroom cowSHOULDER_ENTITYWhen an entity is spawned as a result of the entity it is being perched on jumping or being damagedSILVERFISH_BLOCKWhen a silverfish spawns from a blockSLIME_SPLITWhen a slime splitsSPAWNERWhen a creature spawns from a spawnerSPAWNER_EGGWhen a creature spawns from a Spawner EggTRAPWhen an entity spawns as a trap for players approachingVILLAGE_DEFENSEWhen an iron golem is spawned to defend a villageVILLAGE_INVASIONWhen a zombie is spawned to invade a village -
Method Summary
Modifier and Type Method Description static CreatureSpawnEvent.SpawnReasonvalueOf(String name)Returns the enum constant of this type with the specified name.static CreatureSpawnEvent.SpawnReason[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
NATURAL
When something spawns from natural means -
JOCKEY
When an entity spawns as a jockey of another entity (mostly spider jockeys) -
CHUNK_GEN
Deprecated.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 -
SPAWNER
When a creature spawns from a spawner -
EGG
When a creature spawns from an egg -
SPAWNER_EGG
When a creature spawns from a Spawner Egg -
LIGHTNING
When a creature spawns because of a lightning strike -
BUILD_SNOWMAN
When a snowman is spawned by being built -
BUILD_IRONGOLEM
When an iron golem is spawned by being built -
BUILD_WITHER
When a wither boss is spawned by being built -
VILLAGE_DEFENSE
When an iron golem is spawned to defend a village -
VILLAGE_INVASION
When a zombie is spawned to invade a village -
BREEDING
When an animal breeds to create a child -
SLIME_SPLIT
When a slime splits -
REINFORCEMENTS
When an entity calls for reinforcements -
NETHER_PORTAL
When a creature is spawned by nether portal -
DISPENSE_EGG
When a creature is spawned by a dispenser dispensing an egg -
INFECTION
When a zombie infects a villager -
CURED
When a villager is cured from infection -
OCELOT_BABY
When an ocelot has a baby spawned along with them -
SILVERFISH_BLOCK
When a silverfish spawns from a block -
MOUNT
When an entity spawns as a mount of another entity (mostly chicken jockeys) -
TRAP
When an entity spawns as a trap for players approaching -
ENDER_PEARL
When an entity is spawned as a result of ender pearl usage -
SHOULDER_ENTITY
When an entity is spawned as a result of the entity it is being perched on jumping or being damaged -
DROWNED
When a creature is spawned by another entity drowning -
SHEARED
When an cow is spawned by shearing a mushroom cow -
EXPLOSION
When eg an effect cloud is spawned as a result of a creeper exploding -
RAID
When an entity is spawned as part of a raid -
PATROL
When an entity is spawned as part of a patrol -
BEEHIVE
When a bee is released from a beehive/bee nest -
CUSTOM
When a creature is spawned by plugins -
DEFAULT
When an entity is missing a SpawnReason
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException- if the argument is null
-