程序包 org.bukkit.block

接口 TrialSpawner

所有超级接口:
BlockState, Metadatable, PersistentDataHolder, TileState

@Experimental public interface TrialSpawner extends TileState
代表一个捕获的试炼刷怪笼状态.

原文:Represents a captured state of a trial spawner.

  • 方法详细资料

    • 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

      @NotNull @NotNull Collection<Player> getTrackedPlayers()
      获取此刷怪笼当前正在追踪的玩家.

      注意: 返回的集合是不可变的, 请使用 startTrackingPlayer(Player)stopTrackingPlayer(Player) 代替.

      原文:Gets the players this spawner is currently tracking.

      Note: the returned collection is immutable, use startTrackingPlayer(Player) or stopTrackingPlayer(Player) instead.

      返回:
      此刷怪笼正在追踪的玩家集合, 如果没有则为空集合
    • isTrackingPlayer

      boolean isTrackingPlayer(@NotNull @NotNull Player player)
      检查此刷怪笼当前是否正在追踪指定的玩家.

      原文:Checks if this spawner is currently tracking the provided player.

      参数:
      player - 玩家
      返回:
      如果此刷怪笼正在追踪指定的玩家则返回true
    • startTrackingPlayer

      void startTrackingPlayer(@NotNull @NotNull Player player)
      强制此刷怪笼开始追踪指定的玩家.

      注意: 刷怪笼可能在任何时候决定停止追踪此玩家.

      原文: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

      void stopTrackingPlayer(@NotNull @NotNull Player player)
      强制此刷怪笼停止追踪指定的玩家.

      注意: 刷怪笼可能在任何时候决定重新开始追踪此玩家.

      原文: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

      @NotNull @NotNull Collection<Entity> getTrackedEntities()
      获取此刷怪笼当前正在追踪的实体列表.

      注意: 返回的集合是不可变的, 请使用 startTrackingEntity(Entity)stopTrackingEntity(Entity) 代替.

      原文:Gets a list of entities this spawner is currently tracking.

      Note: the returned collection is immutable, use startTrackingEntity(Entity) or stopTrackingEntity(Entity) instead.

      返回:
      此刷怪笼正在追踪的实体集合, 如果没有则为空集合
    • isTrackingEntity

      boolean isTrackingEntity(@NotNull @NotNull Entity entity)
      检查此刷怪笼当前是否正在追踪指定的实体.

      原文:Checks if this spawner is currently tracking the provided entity.

      参数:
      entity - 实体
      返回:
      如果此刷怪笼正在追踪指定的实体则返回true
    • startTrackingEntity

      void startTrackingEntity(@NotNull @NotNull Entity entity)
      强制此刷怪笼开始追踪指定的实体.

      注意: 刷怪笼可能在任何时候决定停止追踪此实体.

      原文: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

      void stopTrackingEntity(@NotNull @NotNull Entity entity)
      强制此刷怪笼停止追踪指定的实体.

      注意: 刷怪笼可能在任何时候决定重新开始追踪此实体.

      原文: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

      @NotNull @NotNull TrialSpawnerConfiguration getNormalConfiguration()
      获取当isOminous()为false时使用的TrialSpawnerConfiguration.

      原文:Gets the TrialSpawnerConfiguration used when isOminous() is false.

      返回:
      TrialSpawnerConfiguration
    • getOminousConfiguration

      @NotNull @NotNull TrialSpawnerConfiguration getOminousConfiguration()
      获取当isOminous()为true时使用的TrialSpawnerConfiguration.

      原文:Gets the TrialSpawnerConfiguration used when isOminous() is true.

      返回:
      TrialSpawnerConfiguration