Cancellable
public class CreatureSpawnEvent extends EntitySpawnEvent
If a Creature Spawn event is cancelled, the creature will not spawn.
Modifier and Type | Class | Description |
---|---|---|
static class |
CreatureSpawnEvent.SpawnReason |
An enum to specify the type of spawning
|
Event.Result
entity
Constructor | Description |
---|---|
CreatureSpawnEvent(@NotNull LivingEntity spawnee,
@NotNull CreatureSpawnEvent.SpawnReason spawnReason) |
Modifier and Type | Method | Description |
---|---|---|
@NotNull LivingEntity |
getEntity() |
Returns the Entity involved in this event
|
@NotNull CreatureSpawnEvent.SpawnReason |
getSpawnReason() |
Gets the reason for why the creature is being spawned.
|
getEntityType
getHandlerList, getHandlers, getLocation, isCancelled, setCancelled
getEventName, isAsynchronous
public CreatureSpawnEvent(@NotNull @NotNull LivingEntity spawnee, @NotNull @NotNull CreatureSpawnEvent.SpawnReason spawnReason)
@NotNull public @NotNull LivingEntity getEntity()
EntityEvent
getEntity
in class EntityEvent
@NotNull public @NotNull CreatureSpawnEvent.SpawnReason getSpawnReason()
Copyright © 2020. All rights reserved.