Cancellable
public class EntityPortalEvent extends EntityTeleportEvent
For players see PlayerPortalEvent
Event.Result
entity
Constructor | Description |
---|---|
EntityPortalEvent(Entity entity,
Location from,
Location to) |
|
EntityPortalEvent(Entity entity,
Location from,
Location to,
int searchRadius) |
Modifier and Type | Method | Description |
---|---|---|
static HandlerList |
getHandlerList() |
|
HandlerList |
getHandlers() |
|
int |
getSearchRadius() |
Gets the search radius value for finding an available portal.
|
void |
setSearchRadius(int searchRadius) |
Set the Block radius to search in for available portals.
|
getEntity, getEntityType
getFrom, getTo, isCancelled, setCancelled, setFrom, setTo
getEventName, isAsynchronous
public EntityPortalEvent(@NotNull Entity entity, @NotNull Location from, @Nullable Location to)
public void setSearchRadius(int searchRadius)
searchRadius
- the radius in which to search for a portal from the
locationpublic int getSearchRadius()
@NotNull public HandlerList getHandlers()
getHandlers
in class EntityTeleportEvent
@NotNull public static HandlerList getHandlerList()
Copyright © 2020. All rights reserved.