类 EntityPortalEvent
- 所有已实现的接口:
Cancellable
对于玩家请看 PlayerPortalEvent
原文:
Called when a non-player entity is about to teleport because it is in
contact with a portal.
For players see PlayerPortalEvent
-
嵌套类概要
从类继承的嵌套类/接口 org.bukkit.event.Event
Event.Result
-
字段概要
从类继承的字段 org.bukkit.event.entity.EntityEvent
entity
-
构造器概要
-
方法概要
修饰符和类型方法说明static HandlerList
返回Travel Agent使用(或不使用)于本次事件.void
setPortalTravelAgent
(TravelAgent travelAgent) 设置 Travel Agent使用(或不使用)于本次事件.boolean
返回Travel Agent是否启用void
useTravelAgent
(boolean useTravelAgent) 设置Travel Agent是否启用从类继承的方法 org.bukkit.event.entity.EntityTeleportEvent
getFrom, getTo, isCancelled, setCancelled, setFrom, setTo
从类继承的方法 org.bukkit.event.entity.EntityEvent
getEntity, getEntityType
从类继承的方法 org.bukkit.event.Event
getEventName, isAsynchronous
-
字段详细资料
-
useTravelAgent
protected boolean useTravelAgent -
travelAgent
-
-
构造器详细资料
-
EntityPortalEvent
-
-
方法详细资料
-
useTravelAgent
public void useTravelAgent(boolean useTravelAgent) 设置Travel Agent是否启用如果此项别设置为true,TravelAgent将尝试寻找一个
EntityTeleportEvent.getTo()
位置附近的一个传送门 若没有传送门将尝试创建一个传送门.如果此项被设为false,
EntityEvent.getEntity()
将只能被传送到EntityTeleportEvent.getTo()
.- 参数:
useTravelAgent
- Travel Agent是否启用 原文: 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
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 theEntityTeleportEvent.getTo()
Location.useTravelAgent
- whether to use the Travel Agent
-
useTravelAgent
public boolean useTravelAgent()返回Travel Agent是否启用如果此项别设置为true,TravelAgent将尝试寻找一个
EntityTeleportEvent.getTo()
位置附近的一个传送门 若没有传送门将尝试创建一个传送门.如果此项被设为false,
EntityEvent.getEntity()
将只能被传送到EntityTeleportEvent.getTo()
.- 返回:
- 是否启用Travel Agent
原文:
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
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 theEntityTeleportEvent.getTo()
Location.
-
getPortalTravelAgent
返回Travel Agent使用(或不使用)于本次事件.- 返回:
- Travel Agent使用(或不使用)于本次事件 原文: Gets the Travel Agent used (or not) in this event.
-
setPortalTravelAgent
设置 Travel Agent使用(或不使用)于本次事件.- 参数:
travelAgent
- 使用(或不使用)于本次事件. 原文: Sets the Travel Agent used (or not) in this event.travelAgent
- the Travel Agent used (or not) in this event
-
getHandlers
- 覆盖:
getHandlers
在类中EntityTeleportEvent
-
getHandlerList
-