类 EntityPortalEvent

所有已实现的接口:
Cancellable

public class EntityPortalEvent extends EntityTeleportEvent
当一个非玩家的实体被传送门传送时触发本事件

对于玩家请看 PlayerPortalEvent 原文: Called when a non-player entity is about to teleport because it is in contact with a portal.

For players see PlayerPortalEvent

  • 字段详细资料

    • useTravelAgent

      protected boolean useTravelAgent
    • travelAgent

      protected TravelAgent travelAgent
  • 构造器详细资料

  • 方法详细资料

    • 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 the EntityTeleportEvent.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 the EntityTeleportEvent.getTo() Location.

    • getPortalTravelAgent

      public TravelAgent getPortalTravelAgent()
      返回Travel Agent使用(或不使用)于本次事件.
      返回:
      Travel Agent使用(或不使用)于本次事件 原文: Gets the Travel Agent used (or not) in this event.
    • setPortalTravelAgent

      public void setPortalTravelAgent(TravelAgent travelAgent)
      设置 Travel Agent使用(或不使用)于本次事件.
      参数:
      travelAgent - 使用(或不使用)于本次事件. 原文: Sets the Travel Agent used (or not) in this event.
      travelAgent - the Travel Agent used (or not) in this event
    • getHandlers

      public HandlerList getHandlers()
      覆盖:
      getHandlers 在类中 EntityTeleportEvent
    • getHandlerList

      public static HandlerList getHandlerList()