Cancellablepublic class PreCreatureSpawnEvent extends Event implements Cancellable
Event.Result| Constructor | Description | 
|---|---|
| PreCreatureSpawnEvent(Location location,
                     EntityType type,
                     CreatureSpawnEvent.SpawnReason reason) | 
| Modifier and Type | Method | Description | 
|---|---|---|
| static HandlerList | getHandlerList() | |
| HandlerList | getHandlers() | |
| CreatureSpawnEvent.SpawnReason | getReason() | |
| Location | getSpawnLocation() | |
| EntityType | getType() | |
| boolean | isCancelled() | Gets the cancellation state of this event. | 
| void | setCancelled(boolean cancel) | Cancelling this event is more effecient than cancelling CreatureSpawnEvent | 
| void | setShouldAbortSpawn(boolean shouldAbortSpawn) | Set this if you are more blanket blocking all types of these spawns, and wish to abort the spawn process from
 trying more attempts after this cancellation. | 
| boolean | shouldAbortSpawn() | 
callEvent, getEventName, isAsynchronouspublic PreCreatureSpawnEvent(Location location, EntityType type, CreatureSpawnEvent.SpawnReason reason)
public Location getSpawnLocation()
public EntityType getType()
public CreatureSpawnEvent.SpawnReason getReason()
public boolean shouldAbortSpawn()
public void setShouldAbortSpawn(boolean shouldAbortSpawn)
shouldAbortSpawn - Set if the spawn process should be aborted vs trying more attemptspublic HandlerList getHandlers()
getHandlers in class Eventpublic static HandlerList getHandlerList()
public boolean isCancelled()
CancellableisCancelled in interface Cancellablepublic void setCancelled(boolean cancel)
setCancelled in interface Cancellablecancel - true if you wish to cancel this event, and abort the spawn of this creatureCopyright © 2018. All rights reserved.