类 PlayerPortalEvent

所有已实现的接口:
Cancellable

public class PlayerPortalEvent extends PlayerTeleportEvent
玩家将要被传送门传送的事件.

其他实体被传送门传送的事件请见EntityPortalEvent

  • 字段详细资料

    • useTravelAgent

      protected boolean useTravelAgent
    • travelAgent

      protected TravelAgent travelAgent
  • 构造器详细资料

  • 方法详细资料

    • useTravelAgent

      public void useTravelAgent(boolean useTravelAgent)
      设置是否让玩家传送到另一端的传送门.

      如果设置为true,传送门将试图找到与这个传送门相对的另一个传送门PlayerMoveEvent.getTo(),如果没有则创建一个.

      如果设置为false,PlayerEvent.getPlayer()只会被传送到PlayerMoveEvent.getTo()位置.

      原文: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 PlayerMoveEvent.getTo() Location, and will try to create one if there is none.

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

      参数:
      useTravelAgent - 是否让玩家传送到另一端的传送门true/false
    • useTravelAgent

      public boolean useTravelAgent()
      是否让玩家传送到另一端的传送门.

      如果设置为true,传送门将试图找到与这个传送门相对的另一个传送门PlayerMoveEvent.getTo(),如果没有则创建一个.

      如果设置为false,PlayerEvent.getPlayer()只会被传送到PlayerMoveEvent.getTo()位置.

      原文: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 PlayerMoveEvent.getTo() Location, and will try to create one if there is none.

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

      返回:
      是否让玩家传送到另一端的传送门
    • getPortalTravelAgent

      public TravelAgent getPortalTravelAgent()
      获得玩家在这个事件中使用的传送门.

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

      返回:
      玩家在这个事件中使用的传送门
    • setPortalTravelAgent

      public void setPortalTravelAgent(TravelAgent travelAgent)
      设置玩家在这个事件中使用的传送门.

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

      参数:
      travelAgent - 玩家在这个事件中使用的传送门
    • getHandlers

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

      public static HandlerList getHandlerList()