public class CreatureSpawnEvent extends EntitySpawnEvent
If a Creature Spawn event is cancelled, the creature will not spawn.
| Modifier and Type | Class and Description | 
|---|---|
static class  | 
CreatureSpawnEvent.SpawnReason
An enum to specify the type of spawning 
 | 
Event.Resultentity| Constructor and Description | 
|---|
CreatureSpawnEvent(Entity spawnee,
                  CreatureType type,
                  Location loc,
                  CreatureSpawnEvent.SpawnReason reason)
Deprecated.  
 | 
CreatureSpawnEvent(LivingEntity spawnee,
                  CreatureSpawnEvent.SpawnReason spawnReason)  | 
| Modifier and Type | Method and Description | 
|---|---|
CreatureType | 
getCreatureType()
Deprecated. 
 
In favour of  
EntityEvent.getEntityType(). | 
LivingEntity | 
getEntity()
Returns the Entity involved in this event 
 | 
CreatureSpawnEvent.SpawnReason | 
getSpawnReason()
Gets the reason for why the creature is being spawned. 
 | 
getHandlerList, getHandlers, getLocation, isCancelled, setCancelledgetEntityTypegetEventName, isAsynchronouspublic CreatureSpawnEvent(LivingEntity spawnee, CreatureSpawnEvent.SpawnReason spawnReason)
@Deprecated public CreatureSpawnEvent(Entity spawnee, CreatureType type, Location loc, CreatureSpawnEvent.SpawnReason reason)
public LivingEntity getEntity()
EntityEventgetEntity in class EntityEvent@Deprecated public CreatureType getCreatureType()
EntityEvent.getEntityType().public CreatureSpawnEvent.SpawnReason getSpawnReason()
Copyright © 2022. All rights reserved.