程序包 org.bukkit.block

接口 Beacon

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

public interface Beacon extends TileState, Lockable, Nameable
代表信标.
  • 方法详细资料

    • getEntitiesInRange

      @NotNull @NotNull Collection<LivingEntity> getEntitiesInRange()
      返回在此信标影响范围内受其效果影响的所有玩家.

      如果本状态代表的方块不再是信标, 将返回一个空列表(不是null).

      原文:Returns the list of players within the beacon's range of effect.

      This will return an empty list if the block represented by this state is no longer a beacon.

      返回:
      范围内的玩家
      抛出:
      IllegalStateException - 如果方块尚未被放置
    • getTier

      int getTier()
      返回信标金字塔的层叠数 (0-4). 层数代表信标的驱动力等级 (等级越高影响范围越大), 取决于金字塔方块的层数. 层叠数为1时信标底下至少有一层9个方块 (译注:由于我们可以塑造各种形状的金字塔, 金字塔总方块数是不固定的).

      原文:Returns the tier of the beacon pyramid (0-4). The tier refers to the beacon's power level, based on how many layers of blocks are in the pyramid. Tier 1 refers to a beacon with one layer of 9 blocks under it.

      返回:
      信标金字塔层叠数
    • getPrimaryEffect

      @Nullable @Nullable PotionEffect getPrimaryEffect()
      返回信标设置的主效果.

      原文:Returns the primary effect set on the beacon

      返回:
      主效果, 若未设置则为null
    • setPrimaryEffect

      void setPrimaryEffect(@Nullable @Nullable PotionEffectType effect)
      设置信标的主效果, 如要清除则为 null.

      原文:Set the primary effect on this beacon, or null to clear.

      参数:
      effect - 新主效果
    • getSecondaryEffect

      @Nullable @Nullable PotionEffect getSecondaryEffect()
      返回信标设置的辅助效果.

      原文:Returns the secondary effect set on the beacon.

      返回:
      辅助效果, 若未设置则为null
    • setSecondaryEffect

      void setSecondaryEffect(@Nullable @Nullable PotionEffectType effect)
      设置信标的辅助效果, 如要清除则为 null. 请注意层数必须 >= 4 才能使辅助效果生效.

      原文:Set the secondary effect on this beacon, or null to clear. Note that tier must be >= 4 for this effect to be active.

      参数:
      effect - 辅助效果