程序包 org.bukkit.event.player

# 类 PlayerPortalEvent

java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
org.bukkit.event.player.PlayerMoveEvent
org.bukkit.event.player.PlayerTeleportEvent
org.bukkit.event.player.PlayerPortalEvent

所有已实现的接口:
  `Cancellable`

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

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

- ## 嵌套类概要

  ## 从类继承的嵌套类/接口 org.bukkit.event.player.PlayerTeleportEvent

  `PlayerTeleportEvent.TeleportCause`

  ## 从类继承的嵌套类/接口 org.bukkit.event.Event

  `Event.Result`

- ## 字段概要

  ### 从类继承的字段 org.bukkit.event.player.PlayerEvent

  `player`

- ## 构造器概要

  构造器
  构造器
  说明
  `PlayerPortalEvent(@NotNull Player player, @NotNull Location from, @Nullable Location to)`
  `PlayerPortalEvent(@NotNull Player player, @NotNull Location from, @Nullable Location to, @NotNull PlayerTeleportEvent.TeleportCause cause)`
  `PlayerPortalEvent(@NotNull Player player, @NotNull Location from, @Nullable Location to, @NotNull PlayerTeleportEvent.TeleportCause cause, int getSearchRadius, boolean canCreatePortal, int creationRadius)`

- ## 方法概要

  修饰符和类型
  方法
  说明
  `boolean`
  `getCanCreatePortal()`
  Returns whether the server will attempt to create a destination portal or not.
  `int`
  `getCreationRadius()`
  Gets the maximum radius the world is searched for a free space from the given location.
  `static @NotNull HandlerList`
  `getHandlerList()`
  `@NotNull HandlerList`
  `getHandlers()`
  `int`
  `getSearchRadius()`
  Gets the search radius value for finding an available portal.
  `void`
  `setCanCreatePortal(boolean canCreatePortal)`
  Sets whether the server should attempt to create a destination portal or not.
  `void`
  `setCreationRadius(int creationRadius)`
  Sets the maximum radius the world is searched for a free space from the given location.
  `void`
  `setSearchRadius(int searchRadius)`
  Set the Block radius to search in for available portals.

  ### 从类继承的方法 org.bukkit.event.player.PlayerTeleportEvent

  `getCause`

  ### 从类继承的方法 org.bukkit.event.player.PlayerMoveEvent

  `getFrom, getTo, isCancelled, setCancelled, setFrom, setTo`

  ### 从类继承的方法 org.bukkit.event.player.PlayerEvent

  `getPlayer`

  ### 从类继承的方法 org.bukkit.event.Event

  `getEventName, isAsynchronous`

  ### 从类继承的方法 java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## 构造器详细资料

  - ### PlayerPortalEvent

    public PlayerPortalEvent(@NotNull @NotNull Player player, @NotNull @NotNull Location from, @Nullable @Nullable Location to)

  - ### PlayerPortalEvent

    public PlayerPortalEvent(@NotNull @NotNull Player player, @NotNull @NotNull Location from, @Nullable @Nullable Location to, @NotNull @NotNull PlayerTeleportEvent.TeleportCause cause)

  - ### PlayerPortalEvent

    public PlayerPortalEvent(@NotNull @NotNull Player player, @NotNull @NotNull Location from, @Nullable @Nullable Location to, @NotNull @NotNull PlayerTeleportEvent.TeleportCause cause, int getSearchRadius, boolean canCreatePortal, int creationRadius)

- ## 方法详细资料

  - ### setSearchRadius

    public void setSearchRadius(int searchRadius)
    Set the Block radius to search in for available portals.
    参数:
      `searchRadius` - the radius in which to search for a portal from the location

  - ### getSearchRadius

    public int getSearchRadius()
    Gets the search radius value for finding an available portal.
    返回:
      the currently set search radius

  - ### getCanCreatePortal

    public boolean getCanCreatePortal()
    Returns whether the server will attempt to create a destination portal or not.
    返回:
      whether there should create be a destination portal created

  - ### setCanCreatePortal

    public void setCanCreatePortal(boolean canCreatePortal)
    Sets whether the server should attempt to create a destination portal or not.
    参数:
      `canCreatePortal` - Sets whether there should be a destination portal created

  - ### setCreationRadius

    public void setCreationRadius(int creationRadius)
    Sets the maximum radius the world is searched for a free space from the given location. If enough free space is found then the portal will be created there, if not it will force create with air-space at the target location. Does not apply to end portal target platforms which will always appear at the target location.
    参数:
      `creationRadius` - the radius in which to create a portal from the location

  - ### getCreationRadius

    public int getCreationRadius()
    Gets the maximum radius the world is searched for a free space from the given location. If enough free space is found then the portal will be created there, if not it will force create with air-space at the target location. Does not apply to end portal target platforms which will always appear at the target location.
    返回:
      the currently set creation radius

  - ### getHandlers

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

  - ### getHandlerList

    @NotNull public static @NotNull HandlerList getHandlerList()