Bukkit-API  1.7.9-R0.2
The inofficial Bukkit-API
org.bukkit.event.player.PlayerPortalEvent Class Reference
Inheritance diagram for org.bukkit.event.player.PlayerPortalEvent:
org.bukkit.event.player.PlayerTeleportEvent org.bukkit.event.player.PlayerMoveEvent org.bukkit.event.player.PlayerEvent org.bukkit.event.Cancellable org.bukkit.event.Event

Public Member Functions

 PlayerPortalEvent (final Player player, final Location from, final Location to, final TravelAgent pta)
 
 PlayerPortalEvent (Player player, Location from, Location to, TravelAgent pta, TeleportCause cause)
 
void useTravelAgent (boolean useTravelAgent)
 
boolean useTravelAgent ()
 
TravelAgent getPortalTravelAgent ()
 
void setPortalTravelAgent (TravelAgent travelAgent)
 
HandlerList getHandlers ()
 
- Public Member Functions inherited from org.bukkit.event.player.PlayerTeleportEvent
 PlayerTeleportEvent (final Player player, final Location from, final Location to)
 
 PlayerTeleportEvent (final Player player, final Location from, final Location to, final TeleportCause cause)
 
TeleportCause getCause ()
 
HandlerList getHandlers ()
 
- Public Member Functions inherited from org.bukkit.event.player.PlayerMoveEvent
 PlayerMoveEvent (final Player player, final Location from, final Location to)
 
boolean isCancelled ()
 
void setCancelled (boolean cancel)
 
Location getFrom ()
 
void setFrom (Location from)
 
Location getTo ()
 
void setTo (Location to)
 
HandlerList getHandlers ()
 
- Public Member Functions inherited from org.bukkit.event.player.PlayerEvent
 PlayerEvent (final Player who)
 
final Player getPlayer ()
 
- Public Member Functions inherited from org.bukkit.event.Event
 Event ()
 
 Event (boolean isAsync)
 
String getEventName ()
 
abstract HandlerList getHandlers ()
 
final boolean isAsynchronous ()
 

Static Public Member Functions

static HandlerList getHandlerList ()
 
- Static Public Member Functions inherited from org.bukkit.event.player.PlayerTeleportEvent
static HandlerList getHandlerList ()
 
- Static Public Member Functions inherited from org.bukkit.event.player.PlayerMoveEvent
static HandlerList getHandlerList ()
 

Protected Attributes

boolean useTravelAgent = true
 
TravelAgent travelAgent
 
- Protected Attributes inherited from org.bukkit.event.player.PlayerEvent
Player player
 

Detailed Description

Called when a player is about to teleport because it is in contact with a portal.

For other entities see org.bukkit.event.entity.EntityPortalEvent

Definition at line 14 of file PlayerPortalEvent.java.

Member Function Documentation

TravelAgent org.bukkit.event.player.PlayerPortalEvent.getPortalTravelAgent ( )

Gets the Travel Agent used (or not) in this event.

Returns
the Travel Agent used (or not) in this event

Definition at line 66 of file PlayerPortalEvent.java.

66  {
67  return this.travelAgent;
68  }
void org.bukkit.event.player.PlayerPortalEvent.setPortalTravelAgent ( TravelAgent  travelAgent)

Sets the Travel Agent used (or not) in this event.

Parameters
travelAgentthe Travel Agent used (or not) in this event

Definition at line 75 of file PlayerPortalEvent.java.

75  {
76  this.travelAgent = travelAgent;
77  }
void org.bukkit.event.player.PlayerPortalEvent.useTravelAgent ( boolean  useTravelAgent)

Sets whether or not the Travel Agent will be used.

If this is set to true, the TravelAgent will try to find a Portal at the getTo() Location, and will try to create one if there is none.

If this is set to false, the getPlayer() will only be teleported to the getTo() Location.

Parameters
useTravelAgentwhether to use the Travel Agent

Definition at line 41 of file PlayerPortalEvent.java.

References org.bukkit.event.player.PlayerPortalEvent.useTravelAgent().

boolean org.bukkit.event.player.PlayerPortalEvent.useTravelAgent ( )

Gets whether or not the Travel Agent will be used.

If this is set to true, the TravelAgent will try to find a Portal at the getTo() Location, and will try to create one if there is none.

If this is set to false, the getPlayer()} will only be teleported to the getTo() Location.

Returns
whether to use the Travel Agent

Definition at line 57 of file PlayerPortalEvent.java.

Referenced by org.bukkit.event.player.PlayerPortalEvent.useTravelAgent().

57  {
58  return useTravelAgent && travelAgent != null;
59  }

The documentation for this class was generated from the following file: