Cancellable
public class EntityPathfindEvent extends EntityEvent implements Cancellable
Event.Result
entity
Constructor | Description |
---|---|
EntityPathfindEvent(Entity entity,
Location loc,
Entity targetEntity) |
Modifier and Type | Method | Description |
---|---|---|
Entity |
getEntity() |
The Entity that is pathfinding.
|
static HandlerList |
getHandlerList() |
|
HandlerList |
getHandlers() |
|
Location |
getLoc() |
The Location of where the entity is about to move to.
|
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.
|
getEntityType
callEvent, getEventName, isAsynchronous
@NotNull public Entity getEntity()
getEntity
in class EntityEvent
@Nullable public Entity getTargetEntity()
@NotNull public Location getLoc()
@NotNull public HandlerList getHandlers()
getHandlers
in class Event
@NotNull public static HandlerList getHandlerList()
public boolean isCancelled()
Cancellable
isCancelled
in interface Cancellable
public void setCancelled(boolean cancel)
Cancellable
setCancelled
in interface Cancellable
cancel
- true if you wish to cancel this eventCopyright © 2020. All rights reserved.