Bukkit-API  1.7.9-R0.2
The inofficial Bukkit-API
org.bukkit.event.entity.EntityPortalEvent Class Reference
Inheritance diagram for org.bukkit.event.entity.EntityPortalEvent:
org.bukkit.event.entity.EntityTeleportEvent org.bukkit.event.entity.EntityEvent org.bukkit.event.Cancellable org.bukkit.event.Event

Public Member Functions

 EntityPortalEvent (final Entity entity, final Location from, final Location to, final TravelAgent pta)
 
void useTravelAgent (boolean useTravelAgent)
 
boolean useTravelAgent ()
 
TravelAgent getPortalTravelAgent ()
 
void setPortalTravelAgent (TravelAgent travelAgent)
 
HandlerList getHandlers ()
 
- Public Member Functions inherited from org.bukkit.event.entity.EntityTeleportEvent
 EntityTeleportEvent (Entity what, Location from, 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.entity.EntityEvent
 EntityEvent (final Entity what)
 
Entity getEntity ()
 
EntityType getEntityType ()
 
- 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.entity.EntityTeleportEvent
static HandlerList getHandlerList ()
 

Protected Attributes

boolean useTravelAgent = true
 
TravelAgent travelAgent
 
- Protected Attributes inherited from org.bukkit.event.entity.EntityEvent
Entity entity
 

Detailed Description

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

For players see org.bukkit.event.player.PlayerPortalEvent

Definition at line 14 of file EntityPortalEvent.java.

Member Function Documentation

TravelAgent org.bukkit.event.entity.EntityPortalEvent.getPortalTravelAgent ( )

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

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

Definition at line 61 of file EntityPortalEvent.java.

61  {
62  return this.travelAgent;
63  }
void org.bukkit.event.entity.EntityPortalEvent.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 70 of file EntityPortalEvent.java.

70  {
71  this.travelAgent = travelAgent;
72  }
void org.bukkit.event.entity.EntityPortalEvent.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 getEntity() will only be teleported to the getTo() Location.

Parameters
useTravelAgentwhether to use the Travel Agent

Definition at line 36 of file EntityPortalEvent.java.

References org.bukkit.event.entity.EntityPortalEvent.useTravelAgent().

boolean org.bukkit.event.entity.EntityPortalEvent.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 getEntity() will only be teleported to the getTo() Location.

Returns
whether to use the Travel Agent

Definition at line 52 of file EntityPortalEvent.java.

Referenced by org.bukkit.event.entity.EntityPortalEvent.useTravelAgent().

52  {
53  return useTravelAgent;
54  }

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