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
Called when a non-player entity is about to teleport because it is in
 contact with a portal.
 
 For players see PlayerPortalEvent
- 
Nested Class SummaryNested classes/interfaces inherited from class org.bukkit.event.EventEvent.Result
- 
Field SummaryFields inherited from class org.bukkit.event.entity.EntityEvententity
- 
Constructor SummaryConstructorsConstructorDescriptionEntityPortalEvent(@NotNull Entity entity, @NotNull Location from, @Nullable Location to, int searchRadius) EntityPortalEvent(@NotNull Entity entity, @NotNull Location from, @Nullable Location to, int searchRadius, PortalType portalType) 
- 
Method SummaryModifier and TypeMethodDescriptionstatic @NotNull HandlerListGet the portal type relating to this event.intGets the search radius value for finding an available portal.getTo()ForPortalType.NETHER, this is initially just the starting point for the search for a portal to teleport to.voidsetSearchRadius(int searchRadius) Set the Block radius to search in for available portals.voidSee the description ofgetTo().Methods inherited from class org.bukkit.event.entity.EntityTeleportEventgetFrom, isCancelled, setCancelled, setFromMethods inherited from class org.bukkit.event.entity.EntityEventgetEntity, getEntityTypeMethods inherited from class org.bukkit.event.EventcallEvent, getEventName, isAsynchronous
- 
Constructor Details- 
EntityPortalEvent
- 
EntityPortalEvent
- 
EntityPortalEvent
 
- 
- 
Method Details- 
getPortalTypeGet the portal type relating to this event.- Returns:
- the portal type
 
- 
getToForPortalType.NETHER, this is initially just the starting point for the search for a portal to teleport to. It will initially just be theEntityTeleportEvent.getFrom()scaled for dimension scaling and clamped to be inside the world border.For PortalType.ENDER, this will initially be the exact destination either, the world spawn for end->any world or end spawn for any world->end.- Overrides:
- getToin class- EntityTeleportEvent
- Returns:
- starting point for search or exact destination
 
- 
setToSee the description ofgetTo().- Overrides:
- setToin class- EntityTeleportEvent
- Parameters:
- to- starting point for search or exact destination or null to cancel
 
- 
setSearchRadiuspublic 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
 
- 
getSearchRadiuspublic int getSearchRadius()Gets the search radius value for finding an available portal.- Returns:
- the currently set search radius
 
- 
getHandlers- Overrides:
- getHandlersin class- EntityTeleportEvent
 
- 
getHandlerList
 
-