Package org.bukkit.event.entity
Class CreatureSpawnEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.entity.EntityEvent
org.bukkit.event.entity.EntitySpawnEvent
org.bukkit.event.entity.CreatureSpawnEvent
- All Implemented Interfaces:
- Cancellable
Called when a creature is spawned into a world.
 
If a Creature Spawn event is cancelled, the creature will not spawn.
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic classAn enum to specify the type of spawningNested classes/interfaces inherited from class org.bukkit.event.EventEvent.Result
- 
Field SummaryFields inherited from class org.bukkit.event.entity.EntityEvententity
- 
Constructor SummaryConstructorsConstructorDescriptionCreatureSpawnEvent(LivingEntity spawnee, CreatureSpawnEvent.SpawnReason spawnReason)
- 
Method SummaryModifier and TypeMethodDescriptionReturns the Entity involved in this eventGets the reason for why the creature is being spawned.Methods inherited from class org.bukkit.event.entity.EntitySpawnEventgetHandlerList, getHandlers, getLocation, isCancelled, setCancelledMethods inherited from class org.bukkit.event.entity.EntityEventgetEntityTypeMethods inherited from class org.bukkit.event.EventgetEventName, isAsynchronous
- 
Constructor Details- 
CreatureSpawnEventpublic CreatureSpawnEvent(@NotNull LivingEntity spawnee, @NotNull CreatureSpawnEvent.SpawnReason spawnReason)
 
- 
- 
Method Details- 
getEntityDescription copied from class:EntityEventReturns the Entity involved in this event- Overrides:
- getEntityin class- EntityEvent
- Returns:
- Entity who is involved in this event
 
- 
getSpawnReasonGets the reason for why the creature is being spawned.- Returns:
- A SpawnReason value detailing the reason for the creature being spawned
 
 
-