Cancellablepublic class PlayerPortalEvent extends PlayerTeleportEvent
 For other entities see EntityPortalEvent
Event.ResultPlayerTeleportEvent.TeleportCauseplayer| Constructor | Description | 
|---|---|
| PlayerPortalEvent(Player player,
                 Location from,
                 Location to) | |
| PlayerPortalEvent(Player player,
                 Location from,
                 Location to,
                 PlayerTeleportEvent.TeleportCause cause) | |
| PlayerPortalEvent(Player player,
                 Location from,
                 Location to,
                 PlayerTeleportEvent.TeleportCause cause,
                 int getSearchRadius,
                 boolean canCreatePortal,
                 int creationRadius) | 
| Modifier and Type | Method | Description | 
|---|---|---|
| boolean | getCanCreatePortal() | Returns whether the server will attempt to create a destination portal or
 not. | 
| int | getCreationRadius() | Gets the maximum radius the world is searched for a free space from the
 given location. | 
| static HandlerList | getHandlerList() | |
| HandlerList | getHandlers() | |
| int | getSearchRadius() | Gets the search radius value for finding an available portal. | 
| void | setCanCreatePortal(boolean canCreatePortal) | Sets whether the server should attempt to create a destination portal or
 not. | 
| void | setCreationRadius(int creationRadius) | Sets the maximum radius the world is searched for a free space from the
 given location. | 
| void | setSearchRadius(int searchRadius) | Set the Block radius to search in for available portals. | 
callEvent, getEventName, isAsynchronousclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetPlayergetFrom, getTo, isCancelled, setCancelled, setFrom, setTogetCausepublic PlayerPortalEvent(@NotNull Player player, @NotNull Location from, @Nullable Location to)
public PlayerPortalEvent(@NotNull Player player, @NotNull Location from, @Nullable Location to, @NotNull PlayerTeleportEvent.TeleportCause cause)
public void setSearchRadius(int searchRadius)
searchRadius - the radius in which to search for a portal from the
 locationpublic int getSearchRadius()
public boolean getCanCreatePortal()
public void setCanCreatePortal(boolean canCreatePortal)
canCreatePortal - Sets whether there should be a destination portal
 createdpublic void setCreationRadius(int creationRadius)
creationRadius - the radius in which to create a portal from the
 locationpublic int getCreationRadius()
@NotNull public HandlerList getHandlers()
getHandlers in class PlayerTeleportEvent@NotNull public static HandlerList getHandlerList()
Copyright © 2020. All rights reserved.