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.Result
entity
Constructor and Description |
---|
CreatureSpawnEvent(LivingEntity spawnee,
CreatureSpawnEvent.SpawnReason spawnReason) |
Modifier and Type | Method and Description |
---|---|
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, setCancelled
getEntityType
getEventName, isAsynchronous
public CreatureSpawnEvent(LivingEntity spawnee, CreatureSpawnEvent.SpawnReason spawnReason)
public LivingEntity getEntity()
EntityEvent
getEntity
in class EntityEvent
public CreatureSpawnEvent.SpawnReason getSpawnReason()
Copyright © 2017. All rights reserved.