public class PlayerPortalEvent extends PlayerTeleportEvent
 For other entities see EntityPortalEvent
PlayerTeleportEvent.TeleportCauseEvent.Result| Modifier and Type | Field and Description | 
|---|---|
protected TravelAgent | 
travelAgent  | 
protected boolean | 
useTravelAgent  | 
player| Constructor and Description | 
|---|
PlayerPortalEvent(Player player,
                 Location from,
                 Location to,
                 TravelAgent pta)  | 
PlayerPortalEvent(Player player,
                 Location from,
                 Location to,
                 TravelAgent pta,
                 PlayerTeleportEvent.TeleportCause cause)  | 
| Modifier and Type | Method and Description | 
|---|---|
static HandlerList | 
getHandlerList()  | 
HandlerList | 
getHandlers()  | 
TravelAgent | 
getPortalTravelAgent()
Gets the Travel Agent used (or not) in this event. 
 | 
void | 
setPortalTravelAgent(TravelAgent travelAgent)
Sets the Travel Agent used (or not) in this event. 
 | 
boolean | 
useTravelAgent()
Gets whether or not the Travel Agent will be used. 
 | 
void | 
useTravelAgent(boolean useTravelAgent)
Sets whether or not the Travel Agent will be used. 
 | 
getCausegetFrom, getTo, isCancelled, setCancelled, setFrom, setTogetPlayercallEvent, getEventName, isAsynchronousprotected boolean useTravelAgent
protected TravelAgent travelAgent
public PlayerPortalEvent(@NotNull
                         Player player,
                         @NotNull
                         Location from,
                         @Nullable
                         Location to,
                         @NotNull
                         TravelAgent pta)
public PlayerPortalEvent(@NotNull
                         Player player,
                         @NotNull
                         Location from,
                         @Nullable
                         Location to,
                         @NotNull
                         TravelAgent pta,
                         @NotNull
                         PlayerTeleportEvent.TeleportCause cause)
public void useTravelAgent(boolean useTravelAgent)
 If this is set to true, the TravelAgent will try to find a Portal at
 the PlayerMoveEvent.getTo() Location, and will try to create one if there is
 none.
 
 If this is set to false, the PlayerEvent.getPlayer() will only be
 teleported to the PlayerMoveEvent.getTo() Location.
useTravelAgent - whether to use the Travel Agentpublic boolean useTravelAgent()
 If this is set to true, the TravelAgent will try to find a Portal at
 the PlayerMoveEvent.getTo() Location, and will try to create one if there is
 none.
 
 If this is set to false, the PlayerEvent.getPlayer()} will only be
 teleported to the PlayerMoveEvent.getTo() Location.
@NotNull public TravelAgent getPortalTravelAgent()
public void setPortalTravelAgent(@NotNull
                                 TravelAgent travelAgent)
travelAgent - the Travel Agent used (or not) in this event@NotNull public HandlerList getHandlers()
getHandlers in class PlayerTeleportEvent@NotNull public static HandlerList getHandlerList()
Copyright © 2022. All rights reserved.