Cancellable
public class EntityPortalEvent extends EntityTeleportEvent
For players see PlayerPortalEvent
Event.Result
entity
Constructor | Description |
---|---|
EntityPortalEvent(@NotNull Entity entity,
@NotNull Location from,
@Nullable Location to) |
|
EntityPortalEvent(@NotNull Entity entity,
@NotNull Location from,
@Nullable Location to,
int searchRadius) |
Modifier and Type | Method | Description |
---|---|---|
static @NotNull HandlerList |
getHandlerList() |
|
@NotNull 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
callEvent, getEventName, isAsynchronous
public EntityPortalEvent(@NotNull @NotNull Entity entity, @NotNull @NotNull Location from, @Nullable @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 @NotNull HandlerList getHandlers()
getHandlers
in class EntityTeleportEvent
@NotNull public static @NotNull HandlerList getHandlerList()
Copyright © 2020. All rights reserved.