org.bukkit.event.entity
Enum CreatureSpawnEvent.SpawnReason

java.lang.Object
  extended by java.lang.Enum<CreatureSpawnEvent.SpawnReason>
      extended by org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason
All Implemented Interfaces:
Serializable, Comparable<CreatureSpawnEvent.SpawnReason>
Enclosing class:
CreatureSpawnEvent

public static enum CreatureSpawnEvent.SpawnReason
extends Enum<CreatureSpawnEvent.SpawnReason>

An enum to specify the type of spawning


Enum Constant Summary
BED
          Deprecated. No longer used
BREEDING
          When an animal breeds to create a child
BUILD_IRONGOLEM
          When an iron golem is spawned by being built
BUILD_SNOWMAN
          When a snowman is spawned by being built
BUILD_WITHER
          When a wither boss is spawned by being built
CHUNK_GEN
          When a creature spawns due to chunk generation
CUSTOM
          When a creature is spawned by plugins
DEFAULT
          When an entity is missing a SpawnReason
EGG
          When a creature spawns from an egg
JOCKEY
          When an entity spawns as a jockey of another entity (mostly spider jockeys)
LIGHTNING
          When a creature spawns because of a lightning strike
NATURAL
          When something spawns from natural means
SLIME_SPLIT
          When a slime splits
SPAWNER
          When a creature spawns from a spawner
SPAWNER_EGG
          When a creature spawns from a Spawner Egg
VILLAGE_DEFENSE
          When an iron golem is spawned to defend a village
VILLAGE_INVASION
          When a zombie is spawned to invade a village
 
Method Summary
static CreatureSpawnEvent.SpawnReason valueOf(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're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

NATURAL

public static final CreatureSpawnEvent.SpawnReason NATURAL
When something spawns from natural means


JOCKEY

public static final CreatureSpawnEvent.SpawnReason JOCKEY
When an entity spawns as a jockey of another entity (mostly spider jockeys)


CHUNK_GEN

public static final CreatureSpawnEvent.SpawnReason CHUNK_GEN
When a creature spawns due to chunk generation


SPAWNER

public static final CreatureSpawnEvent.SpawnReason SPAWNER
When a creature spawns from a spawner


EGG

public static final CreatureSpawnEvent.SpawnReason EGG
When a creature spawns from an egg


SPAWNER_EGG

public static final CreatureSpawnEvent.SpawnReason SPAWNER_EGG
When a creature spawns from a Spawner Egg


LIGHTNING

public static final CreatureSpawnEvent.SpawnReason LIGHTNING
When a creature spawns because of a lightning strike


BED

@Deprecated
public static final CreatureSpawnEvent.SpawnReason BED
Deprecated. No longer used
When a creature is spawned by a player that is sleeping


BUILD_SNOWMAN

public static final CreatureSpawnEvent.SpawnReason BUILD_SNOWMAN
When a snowman is spawned by being built


BUILD_IRONGOLEM

public static final CreatureSpawnEvent.SpawnReason BUILD_IRONGOLEM
When an iron golem is spawned by being built


BUILD_WITHER

public static final CreatureSpawnEvent.SpawnReason BUILD_WITHER
When a wither boss is spawned by being built


VILLAGE_DEFENSE

public static final CreatureSpawnEvent.SpawnReason VILLAGE_DEFENSE
When an iron golem is spawned to defend a village


VILLAGE_INVASION

public static final CreatureSpawnEvent.SpawnReason VILLAGE_INVASION
When a zombie is spawned to invade a village


BREEDING

public static final CreatureSpawnEvent.SpawnReason BREEDING
When an animal breeds to create a child


SLIME_SPLIT

public static final CreatureSpawnEvent.SpawnReason SLIME_SPLIT
When a slime splits


CUSTOM

public static final CreatureSpawnEvent.SpawnReason CUSTOM
When a creature is spawned by plugins


DEFAULT

public static final CreatureSpawnEvent.SpawnReason DEFAULT
When an entity is missing a SpawnReason

Method Detail

values

public static final CreatureSpawnEvent.SpawnReason[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(CreatureSpawnEvent.SpawnReason c : CreatureSpawnEvent.SpawnReason.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static CreatureSpawnEvent.SpawnReason valueOf(String name)
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 name


Copyright © 2013. All Rights Reserved.