![]() |
Bukkit
1.4.7-R1.0
|
Called when a creature is spawned into a world. More...
Inheritance diagram for org.bukkit.event.entity.CreatureSpawnEvent:
Collaboration diagram for org.bukkit.event.entity.CreatureSpawnEvent:Classes | |
| enum | SpawnReason |
| An enum to specify the type of spawning. More... | |
Public Member Functions | |
| CreatureSpawnEvent (final LivingEntity spawnee, final SpawnReason spawnReason) | |
| CreatureSpawnEvent (Entity spawnee, CreatureType type, Location loc, SpawnReason reason) | |
| boolean | isCancelled () |
| void | setCancelled (boolean cancel) |
| LivingEntity | getEntity () |
| Location | getLocation () |
| Gets the location at which the creature is spawning. | |
| CreatureType | getCreatureType () |
| Gets the type of creature being spawned. | |
| SpawnReason | getSpawnReason () |
| Gets the reason for why the creature is being spawned. | |
| HandlerList | getHandlers () |
Public Member Functions inherited from org.bukkit.event.entity.EntityEvent | |
| EntityEvent (final Entity what) | |
| Entity | getEntity () |
| Returns the Entity involved in this event. | |
| EntityType | getEntityType () |
| Gets the EntityType of the Entity involved in this event. | |
Public Member Functions inherited from org.bukkit.event.Event | |
| Event () | |
| The default constructor is defined for cleaner code. | |
| Event (boolean isAsync) | |
| This constructor is used to explicitly declare an event as synchronous or asynchronous. | |
| String | getEventName () |
| final boolean | isAsynchronous () |
| Any custom event that should not by synchronized with other events must use the specific constructor. | |
Public Member Functions inherited from org.bukkit.event.Cancellable | |
| boolean | isCancelled () |
| Gets the cancellation state of this event. | |
| void | setCancelled (boolean cancel) |
| Sets the cancellation state of this event. | |
Static Public Member Functions | |
| static HandlerList | getHandlerList () |
Additional Inherited Members | |
Protected Attributes inherited from org.bukkit.event.entity.EntityEvent | |
| Entity | entity |
Called when a creature is spawned into a world.
If a Creature Spawn event is cancelled, the creature will not spawn.
Definition at line 15 of file CreatureSpawnEvent.java.
| org.bukkit.event.entity.CreatureSpawnEvent.CreatureSpawnEvent | ( | final LivingEntity | spawnee, |
| final SpawnReason | spawnReason | ||
| ) |
Definition at line 20 of file CreatureSpawnEvent.java.
| org.bukkit.event.entity.CreatureSpawnEvent.CreatureSpawnEvent | ( | Entity | spawnee, |
| CreatureType | type, | ||
| Location | loc, | ||
| SpawnReason | reason | ||
| ) |
Definition at line 26 of file CreatureSpawnEvent.java.
| CreatureType org.bukkit.event.entity.CreatureSpawnEvent.getCreatureType | ( | ) |
Gets the type of creature being spawned.
Definition at line 60 of file CreatureSpawnEvent.java.
References org.bukkit.entity.CreatureType.fromEntityType(), and org.bukkit.event.entity.EntityEvent.getEntityType().
| LivingEntity org.bukkit.event.entity.CreatureSpawnEvent.getEntity | ( | ) |
Definition at line 40 of file CreatureSpawnEvent.java.
References org.bukkit.event.entity.EntityEvent.entity.
Referenced by org.bukkit.event.entity.CreatureSpawnEvent.getLocation().
|
static |
Definition at line 78 of file CreatureSpawnEvent.java.
|
virtual |
Implements org.bukkit.event.Event.
Definition at line 74 of file CreatureSpawnEvent.java.
| Location org.bukkit.event.entity.CreatureSpawnEvent.getLocation | ( | ) |
Gets the location at which the creature is spawning.
Definition at line 49 of file CreatureSpawnEvent.java.
References org.bukkit.event.entity.CreatureSpawnEvent.getEntity(), and org.bukkit.entity.Entity.getLocation().
| SpawnReason org.bukkit.event.entity.CreatureSpawnEvent.getSpawnReason | ( | ) |
Gets the reason for why the creature is being spawned.
Definition at line 69 of file CreatureSpawnEvent.java.
| boolean org.bukkit.event.entity.CreatureSpawnEvent.isCancelled | ( | ) |
Definition at line 31 of file CreatureSpawnEvent.java.
| void org.bukkit.event.entity.CreatureSpawnEvent.setCancelled | ( | boolean | cancel | ) |
Definition at line 35 of file CreatureSpawnEvent.java.