Package io.papermc.paper.event.entity
Class EntityMoveEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.entity.EntityEvent
io.papermc.paper.event.entity.EntityMoveEvent
- All Implemented Interfaces:
- Cancellable
Holds information for living entity movement events
 
 Does not fire for players; use PlayerMoveEvent for player movement.
- 
Nested Class SummaryNested classes/interfaces inherited from class org.bukkit.event.EventEvent.Result
- 
Field SummaryFields inherited from class org.bukkit.event.entity.EntityEvententity
- 
Constructor SummaryConstructorsConstructorDescriptionEntityMoveEvent(@NotNull LivingEntity entity, @NotNull Location from, @NotNull Location to) 
- 
Method SummaryModifier and TypeMethodDescriptionReturns the Entity involved in this eventgetFrom()Gets the location this entity moved fromstatic @NotNull HandlerListgetTo()Gets the location this entity moved tobooleanCheck if the entity has moved to a new block in the eventbooleanCheck if the entity has changed orientation in the eventbooleanCheck if the entity has changed position (even within the same block) in the eventbooleanCheck if the entity has moved to a new block in the event, disregarding a possible world changebooleanCheck if the entity has changed position (even within the same block) in the event, disregarding a possible world changebooleanGets the cancellation state of this event.voidsetCancelled(boolean cancel) Sets the cancellation state of this event.voidSets the location to mark as where the entity moved fromvoidSets the location that this entity will move toMethods inherited from class org.bukkit.event.entity.EntityEventgetEntityTypeMethods inherited from class org.bukkit.event.EventcallEvent, getEventName, isAsynchronous
- 
Constructor Details- 
EntityMoveEvent
 
- 
- 
Method Details- 
getEntityDescription copied from class:EntityEventReturns the Entity involved in this event- Overrides:
- getEntityin class- EntityEvent
- Returns:
- Entity who is involved in this event
 
- 
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
 
- 
getFromGets the location this entity moved from- Returns:
- Location the entity moved from
 
- 
setFromSets the location to mark as where the entity moved from- Parameters:
- from- New location to mark as the entity's previous location
 
- 
getToGets the location this entity moved to- Returns:
- Location the entity moved to
 
- 
setToSets the location that this entity will move to- Parameters:
- to- New Location this entity will move to
 
- 
hasChangedPositionpublic boolean hasChangedPosition()Check if the entity has changed position (even within the same block) in the event- Returns:
- whether the entity has changed position or not
 
- 
hasExplicitlyChangedPositionpublic boolean hasExplicitlyChangedPosition()Check if the entity has changed position (even within the same block) in the event, disregarding a possible world change- Returns:
- whether the entity has changed position or not
 
- 
hasChangedBlockpublic boolean hasChangedBlock()Check if the entity has moved to a new block in the event- Returns:
- whether the entity has moved to a new block or not
 
- 
hasExplicitlyChangedBlockpublic boolean hasExplicitlyChangedBlock()Check if the entity has moved to a new block in the event, disregarding a possible world change- Returns:
- whether the entity has moved to a new block or not
 
- 
hasChangedOrientationpublic boolean hasChangedOrientation()Check if the entity has changed orientation in the event- Returns:
- whether the entity has changed orientation or not
 
- 
getHandlers- Specified by:
- getHandlersin class- Event
 
- 
getHandlerList
 
-