程序包 org.bukkit

接口 Raid


public interface Raid
代表袭击事件 (Minecraft Wiki - 袭击).
  • 方法详细资料

    • isStarted

      boolean isStarted()
      判断袭击是否已开始.

      原文:Get whether this raid started.

      返回:
      袭击是否已开始
    • stopRaid

      void stopRaid(boolean removeSpawnedRaiders)
      Stops this raid.
      参数:
      removeSpawnedRaiders - whether to remove spawned raiders
    • getActiveTicks

      long getActiveTicks()
      获取袭击的已持续时长.

      原文:Gets the amount of ticks this raid has existed.

      返回:
      袭击已持续的时长, 以游戏刻为单位
    • getBadOmenLevel

      int getBadOmenLevel()
      获取此次袭击中不祥之兆状态的等级.

      原文:Gets the Bad Omen level of this raid.

      返回:
      不祥之兆状态等级 (范围为0-5)
    • setBadOmenLevel

      void setBadOmenLevel(int badOmenLevel)
      设置此次袭击中不祥之兆状态的等级.
      如果此等级大于1, 将会有额外的与最终波强度一致的袭击波.

      原文:Sets the Bad Omen level.
      If the level is higher than 1, there will be an additional wave that as strong as the final wave.

      参数:
      badOmenLevel - 新的不祥之兆状态等级 (范围为0-5)
      抛出:
      IllegalArgumentException - 等级数值不在有效范围之内
    • getLocation

      @NotNull @NotNull Location getLocation()
      获取袭击的中心位置.

      原文:Gets the center location where the raid occurs.

      返回:
      袭击中心位置
    • getStatus

      获取此袭击的状态.
      请不要使用本方法来检查袭击是否已开始, 应使用isStarted().

      原文:Gets the current status of the raid.
      Do not use this method to check if the raid has been started, call isStarted() instead.

      返回:
      袭击状态
    • getSpawnedGroups

      int getSpawnedGroups()
      获取袭击中已生成的怪物的波数.

      原文:Gets the number of raider groups which have spawned.

      返回:
      已生成的怪物的波数
    • getTotalGroups

      int getTotalGroups()
      获取袭击中生成的怪物的总波数.
      该方法返回的结果也包括额外的袭击波数 (若存在).
      译注:不祥之兆的等级会影响是否有额外的袭击波数 (大于1会有额外的一波或数波袭击).

      原文:Gets the number of raider groups which would spawn.
      This also includes the group which spawns in the additional wave (if present).

      返回:
      袭击总波数 (含额外袭击波数)
    • getTotalWaves

      int getTotalWaves()
      获取袭击的总波数 (排除额外的袭击波数).

      原文:Gets the number of waves in this raid (exclude the additional wave).

      返回:
      袭击总波数 (不含额外袭击波数)
    • setTotalWaves

      void setTotalWaves(int waves)
      Sets the total number of waves in this raid.
      Note: There is an automatic raid timeout that will cancel the raid entirely. At the time of writing, it is 48,000 ticks or 40 minutes. Please keep that in mind when changing the total number of waves, as your raid may be cut short without reward.
      参数:
      waves - new number of waves
      抛出:
      IllegalArgumentException - if total waves are less than 1
    • getTotalHealth

      float getTotalHealth()
      获取所有袭击者的最大生命值总和.

      原文:Gets the sum of all raider's health.

      返回:
      袭击者最大生命值总和
    • getHeroes

      @NotNull @NotNull Set<UUID> getHeroes()
      获取本次袭击中获胜的英雄(玩家)们的UUID.

      原文:Get the UUID of all heroes in this raid.

      返回:
      获胜的英雄(玩家)们的UUID
    • getRaiders

      @NotNull @NotNull List<Raider> getRaiders()
      获取当前一波袭击中所有存活的袭击者.

      原文:Gets all remaining Raider in the present wave.

      返回:
      所有存活的袭击者的列表