public class EntityPortalEvent extends EntityTeleportEvent
For players see PlayerPortalEvent
Event.Result
Modifier and Type | Field and Description |
---|---|
protected TravelAgent |
travelAgent |
protected boolean |
useTravelAgent |
entity
Constructor and Description |
---|
EntityPortalEvent(Entity entity,
Location from,
Location to,
TravelAgent pta) |
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.
|
getFrom, getTo, isCancelled, setCancelled, setFrom, setTo
getEntity, getEntityType
getEventName, isAsynchronous
protected boolean useTravelAgent
protected TravelAgent travelAgent
public EntityPortalEvent(Entity entity, Location from, Location to, TravelAgent pta)
public void useTravelAgent(boolean useTravelAgent)
If this is set to true, the TravelAgent will try to find a Portal at
the EntityTeleportEvent.getTo()
Location, and will try to create one if there is
none.
If this is set to false, the EntityEvent.getEntity()
will only be
teleported to the EntityTeleportEvent.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 EntityTeleportEvent.getTo()
Location, and will try to create one if there is
none.
If this is set to false, the EntityEvent.getEntity()
will only be
teleported to the EntityTeleportEvent.getTo()
Location.
public TravelAgent getPortalTravelAgent()
public void setPortalTravelAgent(TravelAgent travelAgent)
travelAgent
- the Travel Agent used (or not) in this eventpublic HandlerList getHandlers()
getHandlers
in class EntityTeleportEvent
public static HandlerList getHandlerList()
Copyright © 2015. All rights reserved.