public class PlayerPortalEvent extends PlayerTeleportEvent
 For other entities see EntityPortalEvent
PlayerTeleportEvent.TeleportCauseEvent.Resultplayer| Constructor and Description | 
|---|
PlayerPortalEvent(@NotNull Player player,
                 @NotNull Location from,
                 @Nullable Location to)  | 
PlayerPortalEvent(@NotNull Player player,
                 @NotNull Location from,
                 @Nullable Location to,
                 @NotNull PlayerTeleportEvent.TeleportCause cause)  | 
PlayerPortalEvent(@NotNull Player player,
                 @NotNull Location from,
                 @Nullable Location to,
                 @NotNull PlayerTeleportEvent.TeleportCause cause,
                 int getSearchRadius,
                 boolean canCreatePortal,
                 int creationRadius)  | 
| Modifier and Type | Method and 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 @NotNull HandlerList | 
getHandlerList()  | 
@NotNull 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. 
 | 
getCausegetFrom, getTo, isCancelled, setCancelled, setFrom, setTogetPlayergetEventName, isAsynchronouspublic PlayerPortalEvent(@NotNull
                         @NotNull Player player,
                         @NotNull
                         @NotNull Location from,
                         @Nullable
                         @Nullable Location to)
public PlayerPortalEvent(@NotNull
                         @NotNull Player player,
                         @NotNull
                         @NotNull Location from,
                         @Nullable
                         @Nullable Location to,
                         @NotNull
                         @NotNull PlayerTeleportEvent.TeleportCause cause)
public PlayerPortalEvent(@NotNull
                         @NotNull Player player,
                         @NotNull
                         @NotNull Location from,
                         @Nullable
                         @Nullable Location to,
                         @NotNull
                         @NotNull PlayerTeleportEvent.TeleportCause cause,
                         int getSearchRadius,
                         boolean canCreatePortal,
                         int creationRadius)
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 @NotNull HandlerList getHandlers()
getHandlers in class PlayerTeleportEvent@NotNull public static @NotNull HandlerList getHandlerList()
Copyright © 2021. All rights reserved.