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(Entity entity, Location from, Location to) EntityPortalEvent(Entity entity, Location from, Location to, int searchRadius) EntityPortalEvent(Entity entity, Location from, Location to, int searchRadius, boolean canCreatePortal, int creationRadius) 
- 
Method SummaryModifier and TypeMethodDescriptionbooleanReturns whether the server will attempt to create a destination portal or not.intGets the maximum radius the world is searched for a free space from the given location.static HandlerListintGets the search radius value for finding an available portal.voidsetCanCreatePortal(boolean canCreatePortal) Sets whether the server should attempt to create a destination portal or not.voidsetCreationRadius(int creationRadius) Sets the maximum radius the world is searched for a free space from the given location.voidsetSearchRadius(int searchRadius) Set the Block radius to search in for available portals.Methods inherited from class org.bukkit.event.entity.EntityTeleportEventgetFrom, getTo, isCancelled, setCancelled, setFrom, setToMethods inherited from class org.bukkit.event.entity.EntityEventgetEntity, getEntityTypeMethods inherited from class org.bukkit.event.EventgetEventName, isAsynchronous
- 
Constructor Details- 
EntityPortalEvent
- 
EntityPortalEvent
- 
EntityPortalEvent
 
- 
- 
Method Details- 
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
 
- 
getCanCreatePortalpublic boolean getCanCreatePortal()Returns whether the server will attempt to create a destination portal or not.- Returns:
- whether there should create be a destination portal created
 
- 
setCanCreatePortalpublic void setCanCreatePortal(boolean canCreatePortal) Sets whether the server should attempt to create a destination portal or not.- Parameters:
- canCreatePortal- Sets whether there should be a destination portal created
 
- 
setCreationRadiuspublic void setCreationRadius(int creationRadius) Sets the maximum radius the world is searched for a free space from the given location. If enough free space is found then the portal will be created there, if not it will force create with air-space at the target location. Does not apply to end portal target platforms which will always appear at the target location.- Parameters:
- creationRadius- the radius in which to create a portal from the location
 
- 
getCreationRadiuspublic int getCreationRadius()Gets the maximum radius the world is searched for a free space from the given location. If enough free space is found then the portal will be created there, if not it will force create with air-space at the target location. Does not apply to end portal target platforms which will always appear at the target location.- Returns:
- the currently set creation radius
 
- 
getHandlers- Overrides:
- getHandlersin class- EntityTeleportEvent
 
- 
getHandlerList
 
-