Class EntityConstructEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.entity.EntityEvent
io.papermc.paper.event.entity.EntityConstructEvent
- All Implemented Interfaces:
Cancellable
Called just before an
Entity spawns due to a pattern of blocks being constructed (golems, the wither, etc.)
Note: This event is fired before EntitySpawnEvent, before the entity is added to the world,
the success of this event does not guarantee the entity will actually spawn.
-
Nested Class Summary
Nested classes/interfaces inherited from class Event
Event.Result -
Field Summary
Fields inherited from class EntityEvent
entity -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet an immutable list of the blocks required for this construction, including any required air blocks.static HandlerListbooleanGets the cancellation state of this event.voidsetCancelled(boolean cancel) Sets the cancellation state of this event.Methods inherited from class EntityEvent
getEntity, getEntityTypeMethods inherited from class Event
callEvent, getEventName, isAsynchronous
-
Constructor Details
-
EntityConstructEvent
-
-
Method Details
-
getBlocks
Get an immutable list of the blocks required for this construction, including any required air blocks.- Returns:
- the blocks
-
setCancelled
public void setCancelled(boolean cancel) Description copied from interface:CancellableSets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.- Specified by:
setCancelledin interfaceCancellable- Parameters:
cancel-trueif you wish to cancel this event
-
isCancelled
public boolean isCancelled()Description copied from interface:CancellableGets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins- Specified by:
isCancelledin interfaceCancellable- Returns:
trueif this event is cancelled
-
getHandlers
- Specified by:
getHandlersin classEvent
-
getHandlerList
-