接口 TrialSpawner
- 所有超级接口:
BlockState,Metadatable,PersistentDataHolder,TileState
原文:Represents a captured state of a trial spawner.
-
方法概要
修饰符和类型方法说明int获取刷怪笼冷却状态的持续时间(以游戏刻为单位).获取当isOminous()为false时使用的TrialSpawnerConfiguration.获取当isOminous()为true时使用的TrialSpawnerConfiguration.int获取玩家必须在此范围内才能使此刷怪笼激活的最大距离.获取此刷怪笼当前正在追踪的实体列表.获取此刷怪笼当前正在追踪的玩家.boolean检查此刷怪笼是否正在使用不祥的TrialSpawnerConfiguration.booleanisTrackingEntity(@NotNull Entity entity) 检查此刷怪笼当前是否正在追踪指定的实体.booleanisTrackingPlayer(@NotNull Player player) 检查此刷怪笼当前是否正在追踪指定的玩家.voidsetCooldownLength(int ticks) 设置刷怪笼冷却状态的持续时间(以游戏刻为单位).voidsetOminous(boolean ominous) 在普通和不祥的TrialSpawnerConfiguration之间切换此刷怪笼.voidsetRequiredPlayerRange(int requiredPlayerRange) 设置玩家必须在此范围内才能使此刷怪笼激活的最大距离.voidstartTrackingEntity(@NotNull Entity entity) 强制此刷怪笼开始追踪指定的实体.voidstartTrackingPlayer(@NotNull Player player) 强制此刷怪笼开始追踪指定的玩家.voidstopTrackingEntity(@NotNull Entity entity) 强制此刷怪笼停止追踪指定的实体.voidstopTrackingPlayer(@NotNull Player player) 强制此刷怪笼停止追踪指定的玩家.从接口继承的方法 org.bukkit.block.BlockState
copy, copy, getBlock, getBlockData, getChunk, getData, getLightLevel, getLocation, getLocation, getRawData, getType, getWorld, getX, getY, getZ, isPlaced, setBlockData, setData, setRawData, setType, update, update, update从接口继承的方法 org.bukkit.metadata.Metadatable
getMetadata, hasMetadata, removeMetadata, setMetadata从接口继承的方法 org.bukkit.block.TileState
getPersistentDataContainer
-
方法详细资料
-
getCooldownLength
int getCooldownLength()获取刷怪笼冷却状态的持续时间(以游戏刻为单位).原文:Gets the length in ticks the spawner will stay in cooldown for.
- 返回:
- 游戏刻数量
-
setCooldownLength
void setCooldownLength(int ticks) 设置刷怪笼冷却状态的持续时间(以游戏刻为单位).原文:Sets the length in ticks the spawner will stay in cooldown for.
- 参数:
ticks- 游戏刻数量
-
getRequiredPlayerRange
int getRequiredPlayerRange()获取玩家必须在此范围内才能使此刷怪笼激活的最大距离.
如果此值小于或等于0, 则此刷怪笼始终处于激活状态(前提是有玩家在线).
默认值为16.原文:Get the maximum distance a player can be in order for this spawner to be active.
If this value is less than or equal to 0, this spawner is always active (given that there are players online).
Default value is 16.- 返回:
- 玩家必须在此范围内才能使此刷怪笼激活的最大距离
-
setRequiredPlayerRange
void setRequiredPlayerRange(int requiredPlayerRange) 设置玩家必须在此范围内才能使此刷怪笼激活的最大距离.
将此值设置为小于或等于0将使此刷怪笼始终处于激活状态(前提是有玩家在线).原文:Set the maximum distance a player can be in order for this spawner to be active.
Setting this value to less than or equal to 0 will make this spawner always active (given that there are players online).- 参数:
requiredPlayerRange- 玩家必须在此范围内才能使此刷怪笼激活的最大距离
-
getTrackedPlayers
获取此刷怪笼当前正在追踪的玩家.注意: 返回的集合是不可变的, 请使用
startTrackingPlayer(Player)或stopTrackingPlayer(Player)代替.原文:Gets the players this spawner is currently tracking.
Note: the returned collection is immutable, use
startTrackingPlayer(Player)orstopTrackingPlayer(Player)instead.- 返回:
- 此刷怪笼正在追踪的玩家集合, 如果没有则为空集合
-
isTrackingPlayer
检查此刷怪笼当前是否正在追踪指定的玩家.原文:Checks if this spawner is currently tracking the provided player.
- 参数:
player- 玩家- 返回:
- 如果此刷怪笼正在追踪指定的玩家则返回true
-
startTrackingPlayer
强制此刷怪笼开始追踪指定的玩家.注意: 刷怪笼可能在任何时候决定停止追踪此玩家.
原文:Force this spawner to start tracking the provided player.
Note: the spawner may decide to stop tracking this player at any given time.
- 参数:
player- 玩家
-
stopTrackingPlayer
强制此刷怪笼停止追踪指定的玩家.注意: 刷怪笼可能在任何时候决定重新开始追踪此玩家.
原文:Force this spawner to stop tracking the provided player.
Note: the spawner may decide to start tracking this player again at any given time.
- 参数:
player- 玩家
-
getTrackedEntities
获取此刷怪笼当前正在追踪的实体列表.注意: 返回的集合是不可变的, 请使用
startTrackingEntity(Entity)或stopTrackingEntity(Entity)代替.原文:Gets a list of entities this spawner is currently tracking.
Note: the returned collection is immutable, use
startTrackingEntity(Entity)orstopTrackingEntity(Entity)instead.- 返回:
- 此刷怪笼正在追踪的实体集合, 如果没有则为空集合
-
isTrackingEntity
检查此刷怪笼当前是否正在追踪指定的实体.原文:Checks if this spawner is currently tracking the provided entity.
- 参数:
entity- 实体- 返回:
- 如果此刷怪笼正在追踪指定的实体则返回true
-
startTrackingEntity
强制此刷怪笼开始追踪指定的实体.注意: 刷怪笼可能在任何时候决定停止追踪此实体.
原文:Force this spawner to start tracking the provided entity.
Note: the spawner may decide to stop tracking this entity at any given time.
- 参数:
entity- 实体
-
stopTrackingEntity
强制此刷怪笼停止追踪指定的实体.注意: 刷怪笼可能在任何时候决定重新开始追踪此实体.
原文:Force this spawner to stop tracking the provided entity.
Note: the spawner may decide to start tracking this entity again at any given time.
- 参数:
entity- 实体
-
isOminous
boolean isOminous()检查此刷怪笼是否正在使用不祥的TrialSpawnerConfiguration.原文:Checks if this spawner is using the ominous
TrialSpawnerConfiguration.- 返回:
- 如果正在使用不祥配置则返回true
-
setOminous
void setOminous(boolean ominous) 在普通和不祥的TrialSpawnerConfiguration之间切换此刷怪笼.原文:Changes this spawner between the normal and ominous
TrialSpawnerConfiguration.- 参数:
ominous- true表示使用不祥的TrialSpawnerConfiguration, false表示 使用普通的配置
-
getNormalConfiguration
获取当isOminous()为false时使用的TrialSpawnerConfiguration.原文:Gets the
TrialSpawnerConfigurationused whenisOminous()is false.- 返回:
- TrialSpawnerConfiguration
-
getOminousConfiguration
获取当isOminous()为true时使用的TrialSpawnerConfiguration.原文:Gets the
TrialSpawnerConfigurationused whenisOminous()is true.- 返回:
- TrialSpawnerConfiguration
-