类 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
玩家将要被传送门传送的事件, 传送过程中会生成一个退出传送门.
其他实体被传送门传送的事件请见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, @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返回服务器是否将尝试创建目标传送门.int获取从给定位置搜索空闲空间的最大世界半径.static @NotNull HandlerListint获取搜索可用传送门的半径.voidsetCanCreatePortal(boolean canCreatePortal) 设置服务器是否应尝试创建目标传送门.voidsetCreationRadius(int creationRadius) 设置从给定位置搜索空闲空间的最大世界半径.voidsetSearchRadius(int searchRadius) 设置搜索可用传送门的方块半径.从类继承的方法 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
-
构造器详细资料
-
PlayerPortalEvent
-
PlayerPortalEvent
-
PlayerPortalEvent
-
-
方法详细资料
-
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
- 覆盖:
getHandlers在类中PlayerTeleportEvent
-
getHandlerList
-