|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.bukkit.event.Event org.bukkit.event.entity.EntityEvent org.bukkit.event.entity.CreatureSpawnEvent
public class CreatureSpawnEvent
Called when a creature is spawned into a world.
If a Creature Spawn event is cancelled, the creature will not spawn.
Nested Class Summary | |
---|---|
static class |
CreatureSpawnEvent.SpawnReason
An enum to specify the type of spawning |
Nested classes/interfaces inherited from class org.bukkit.event.Event |
---|
Event.Result |
Field Summary |
---|
Fields inherited from class org.bukkit.event.entity.EntityEvent |
---|
entity |
Constructor Summary | |
---|---|
CreatureSpawnEvent(Entity spawnee,
CreatureType type,
Location loc,
CreatureSpawnEvent.SpawnReason reason)
Deprecated. |
|
CreatureSpawnEvent(LivingEntity spawnee,
CreatureSpawnEvent.SpawnReason spawnReason)
|
Method Summary | |
---|---|
CreatureType |
getCreatureType()
Deprecated. In favour of EntityEvent.getEntityType() . |
LivingEntity |
getEntity()
Returns the Entity involved in this event |
static HandlerList |
getHandlerList()
|
HandlerList |
getHandlers()
|
Location |
getLocation()
Gets the location at which the creature is spawning. |
CreatureSpawnEvent.SpawnReason |
getSpawnReason()
Gets the reason for why the creature is being spawned. |
boolean |
isCancelled()
Gets the cancellation state of this event. |
void |
setCancelled(boolean cancel)
Sets the cancellation state of this event. |
Methods inherited from class org.bukkit.event.entity.EntityEvent |
---|
getEntityType |
Methods inherited from class org.bukkit.event.Event |
---|
getEventName, isAsynchronous |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CreatureSpawnEvent(LivingEntity spawnee, CreatureSpawnEvent.SpawnReason spawnReason)
@Deprecated public CreatureSpawnEvent(Entity spawnee, CreatureType type, Location loc, CreatureSpawnEvent.SpawnReason reason)
Method Detail |
---|
public boolean isCancelled()
Cancellable
isCancelled
in interface Cancellable
public void setCancelled(boolean cancel)
Cancellable
setCancelled
in interface Cancellable
cancel
- true if you wish to cancel this eventpublic LivingEntity getEntity()
EntityEvent
getEntity
in class EntityEvent
public Location getLocation()
@Deprecated public CreatureType getCreatureType()
EntityEvent.getEntityType()
.
public CreatureSpawnEvent.SpawnReason getSpawnReason()
public HandlerList getHandlers()
getHandlers
in class Event
public static HandlerList getHandlerList()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |