Package org.bukkit.event.entity

# Class EntityPortalEvent

java.lang.Object
org.bukkit.event.Event
org.bukkit.event.entity.EntityEvent
org.bukkit.event.entity.EntityTeleportEvent
org.bukkit.event.entity.EntityPortalEvent

All Implemented Interfaces:
  `Cancellable`

public class EntityPortalEvent extends EntityTeleportEvent
Called when a non-player entity is about to teleport because it is in contact with a portal.

For players see `PlayerPortalEvent`

## Nested Class Summary

## Nested classes/interfaces inherited from class org.bukkit.event.Event

`Event.Result`

## Field Summary

### Fields inherited from class org.bukkit.event.entity.EntityEvent

`entity`

## Constructor Summary

Constructors
Constructor
Description
`EntityPortalEvent(@NotNull Entity entity, @NotNull Location from, @Nullable Location to)`
`EntityPortalEvent(@NotNull Entity entity, @NotNull Location from, @Nullable Location to, int searchRadius)`

## Method Summary

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.

### Methods inherited from class org.bukkit.event.entity.EntityTeleportEvent

`getFrom, getTo, isCancelled, setCancelled, setFrom, setTo`

### Methods inherited from class org.bukkit.event.entity.EntityEvent

`getEntity, getEntityType`

### Methods inherited from class org.bukkit.event.Event

`callEvent, getEventName, isAsynchronous`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### EntityPortalEvent

public EntityPortalEvent(@NotNull @NotNull Entity entity, @NotNull @NotNull Location from, @Nullable @Nullable Location to)

### EntityPortalEvent

public EntityPortalEvent(@NotNull @NotNull Entity entity, @NotNull @NotNull Location from, @Nullable @Nullable Location to, int searchRadius)

## Method Details

### setSearchRadius

public void setSearchRadius(int searchRadius)
Set the Block radius to search in for available portals.

Parameters:
  `searchRadius` - the radius in which to search for a portal from the location

### getSearchRadius

public int getSearchRadius()
Gets the search radius value for finding an available portal.

Returns:
  the currently set search radius

### getHandlers

@NotNull public @NotNull HandlerList getHandlers()

Overrides:
  `getHandlers` in class `EntityTeleportEvent`

### getHandlerList

@NotNull public static @NotNull HandlerList getHandlerList()