public class PlayerPortalEvent extends PlayerTeleportEvent
For other entities see EntityPortalEvent
PlayerTeleportEvent.TeleportCauseEvent.Resultplayer| Constructor and 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 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 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.
|
getCausegetFrom, getTo, isCancelled, setCancelled, setFrom, setTogetPlayergetEventName, isAsynchronouspublic 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 © 2022. All rights reserved.