类 PlayerPortalEvent

所有已实现的接口:
Cancellable

public class PlayerPortalEvent extends PlayerTeleportEvent
玩家将要被传送门传送的事件, 传送过程中会生成一个退出传送门.

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

  • 构造器详细资料

  • 方法详细资料

    • setSearchRadius

      public void setSearchRadius(int searchRadius)
      设置搜索可用传送门的方块半径.
      参数:
      searchRadius - 从当前位置搜索传送门的半径

      原文:Set the Block radius to search in for available portals.

    • getSearchRadius

      public int getSearchRadius()
      获取搜索可用传送门的半径.
      返回:
      当前设置的搜索半径

      原文:Gets the search radius value for finding an available portal.

    • getCanCreatePortal

      public boolean getCanCreatePortal()
      返回服务器是否将尝试创建目标传送门.
      返回:
      是否应创建目标传送门

      原文:Returns whether the server will attempt to create a destination portal or not.

    • setCanCreatePortal

      public void setCanCreatePortal(boolean canCreatePortal)
      设置服务器是否应尝试创建目标传送门.
      参数:
      canCreatePortal - 是否应创建目标传送门

      原文:Sets whether the server should attempt to create a destination portal or not.

    • setCreationRadius

      public void setCreationRadius(int creationRadius)
      设置从给定位置搜索空闲空间的最大世界半径.

      如果找到足够的空闲空间,则传送门将创建在该处;否则将在目标位置强制以空气空间创建.

      不适用于末地传送门目标平台,该平台将始终出现在目标位置.

      参数:
      creationRadius - 从当前位置创建传送门的半径

      原文:Sets the maximum radius the world is searched for a free space from the given location.

    • getCreationRadius

      public int getCreationRadius()
      获取从给定位置搜索空闲空间的最大世界半径.

      如果找到足够的空闲空间,则传送门将创建在该处;否则将在目标位置强制以空气空间创建.

      不适用于末地传送门目标平台,该平台将始终出现在目标位置.

      返回:
      当前设置的创建半径

      原文:Gets the maximum radius the world is searched for a free space from the given location.

    • getHandlers

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

      @NotNull public static @NotNull HandlerList getHandlerList()