Package org.bukkit.event.entity
Class EntityPlaceEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.entity.EntityEvent
org.bukkit.event.entity.EntityPlaceEvent
- All Implemented Interfaces:
- Cancellable
Triggered when a entity is created in the world by a player "placing" an item
 on a block.
 
Note that this event is currently only fired for four specific placements: armor stands, boats, minecarts, and end crystals.
Note that this event is currently only fired for four specific placements: armor stands, boats, minecarts, and end crystals.
- 
Nested Class SummaryNested classes/interfaces inherited from class org.bukkit.event.EventEvent.Result
- 
Field SummaryFields inherited from class org.bukkit.event.entity.EntityEvententity
- 
Constructor SummaryConstructorsConstructorDescriptionEntityPlaceEvent(Entity entity, Player player, Block block, BlockFace blockFace) Deprecated.EntityPlaceEvent(Entity entity, Player player, Block block, BlockFace blockFace, EquipmentSlot hand) 
- 
Method SummaryModifier and TypeMethodDescriptiongetBlock()Returns the block that the entity was placed onReturns the face of the block that the entity was placed ongetHand()Get the hand used to place the entity.static HandlerListReturns the player placing the entitybooleanGets the cancellation state of this event.voidsetCancelled(boolean cancel) Sets the cancellation state of this event.Methods inherited from class org.bukkit.event.entity.EntityEventgetEntity, getEntityTypeMethods inherited from class org.bukkit.event.EventgetEventName, isAsynchronous
- 
Constructor Details- 
EntityPlaceEventpublic EntityPlaceEvent(@NotNull Entity entity, @Nullable Player player, @NotNull Block block, @NotNull BlockFace blockFace, @NotNull EquipmentSlot hand) 
- 
EntityPlaceEvent@Deprecated(since="1.19.2") public EntityPlaceEvent(@NotNull Entity entity, @Nullable Player player, @NotNull Block block, @NotNull BlockFace blockFace) Deprecated.
 
- 
- 
Method Details- 
getPlayerReturns the player placing the entity- Returns:
- the player placing the entity
 
- 
getBlockReturns the block that the entity was placed on- Returns:
- the block that the entity was placed on
 
- 
getBlockFaceReturns the face of the block that the entity was placed on- Returns:
- the face of the block that the entity was placed on
 
- 
getHandGet the hand used to place the entity.- Returns:
- the hand
 
- 
isCancelledpublic 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 interface- Cancellable
- Returns:
- true if this event is cancelled
 
- 
setCancelledpublic 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 interface- Cancellable
- Parameters:
- cancel- true if you wish to cancel this event
 
- 
getHandlers- Specified by:
- getHandlersin class- Event
 
- 
getHandlerList
 
-