类 PotionData

java.lang.Object
org.bukkit.potion.PotionData

public final class PotionData extends Object
  • 构造器详细资料

    • PotionData

      public PotionData(@NotNull @NotNull PotionType type, boolean extended, boolean upgraded)
      实例化一个不可变的PotionData对象.

      原文:Instantiates a final PotionData object to contain information about a Potion

      参数:
      type - 药水种类
      extended - 药水是否为延长版 (PotionType#isExtendable() 必须为 true)
      upgraded - 药水是否为升级版 (PotionType#isUpgradable() 必须为 true)
    • PotionData

      public PotionData(@NotNull @NotNull PotionType type)
  • 方法详细资料

    • getType

      @NotNull public @NotNull PotionType getType()
      获取此药水的种类, 对应每种可合成药水.

      原文:Gets the type of the potion, Type matches up with each kind of craftable potion

      返回:
      药水种类
    • isUpgraded

      public boolean isUpgraded()
      检测此药水是否可升级. 意思是药水是否有二阶增强版本, 比如再生药水 II.

      原文:Checks if the potion is in an upgraded state. This refers to whether or not the potion is Tier 2, such as Potion of Fire Resistance II.

      返回:
      此类药水是否可升级
    • isExtended

      public boolean isExtended()
      检测此药水是否有时长延长状态 (指时长延长版药水).

      原文:Checks if the potion is in an extended state. This refers to the extended duration potions

      返回:
      是否有时长延长版
    • hashCode

      public int hashCode()
      覆盖:
      hashCode 在类中 Object
    • equals

      public boolean equals(Object obj)
      覆盖:
      equals 在类中 Object