Cancellablepublic class EntityPathfindEvent extends EntityEvent implements Cancellable
Event.Resultentity| Constructor | Description |
|---|---|
EntityPathfindEvent(@NotNull Entity entity,
@NotNull Location loc,
@Nullable Entity targetEntity) |
| Modifier and Type | Method | Description |
|---|---|---|
@NotNull Entity |
getEntity() |
The Entity that is pathfinding.
|
static @NotNull HandlerList |
getHandlerList() |
|
@NotNull HandlerList |
getHandlers() |
|
@NotNull Location |
getLoc() |
The Location of where the entity is about to move to.
|
@Nullable Entity |
getTargetEntity() |
If the Entity is trying to pathfind to an entity, this is the entity in relation.
|
boolean |
isCancelled() |
Gets the cancellation state of this event.
|
void |
setCancelled(boolean cancel) |
Sets the cancellation state of this event.
|
getEntityTypecallEvent, getEventName, isAsynchronous@NotNull public @NotNull Entity getEntity()
getEntity in class EntityEvent@Nullable public @Nullable Entity getTargetEntity()
@NotNull public @NotNull Location getLoc()
@NotNull public @NotNull HandlerList getHandlers()
getHandlers in class Event@NotNull public static @NotNull HandlerList getHandlerList()
public boolean isCancelled()
CancellableisCancelled in interface Cancellablepublic void setCancelled(boolean cancel)
CancellablesetCancelled in interface Cancellablecancel - true if you wish to cancel this eventCopyright © 2020. All rights reserved.