类 PotionData

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

@Deprecated(since="1.20.6", forRemoval=true) public final class PotionData extends Object
已过时, 待删除: 此 API 元素将从以后的版本中删除。
升级/延长的药水现在是它们自己的 PotionType,请改用它们。
  • 构造器概要

    构造器
    构造器
    说明
    已过时, 待删除: 此 API 元素将从以后的版本中删除。
     
    PotionData(@NotNull PotionType type, boolean extended, boolean upgraded)
    已过时, 待删除: 此 API 元素将从以后的版本中删除。
    实例化一个最终的 PotionData 对象以包含有关药水的信息
  • 方法概要

    修饰符和类型
    方法
    说明
    boolean
    已过时, 待删除: 此 API 元素将从以后的版本中删除。
     
    已过时, 待删除: 此 API 元素将从以后的版本中删除。
    获取药水的类型,类型与每种可制作的药水相匹配。
    int
    已过时, 待删除: 此 API 元素将从以后的版本中删除。
     
    boolean
    已过时, 待删除: 此 API 元素将从以后的版本中删除。
    检查药水是否处于延长状态。
    boolean
    已过时, 待删除: 此 API 元素将从以后的版本中删除。
    检查药水是否处于升级状态。

    从类继承的方法 java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • 构造器详细资料

    • PotionData

      public PotionData(@NotNull @NotNull PotionType type, boolean extended, boolean upgraded)
      已过时, 待删除: 此 API 元素将从以后的版本中删除。
      实例化一个最终的 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)
      已过时, 待删除: 此 API 元素将从以后的版本中删除。
  • 方法详细资料

    • getType

      @NotNull public @NotNull PotionType getType()
      已过时, 待删除: 此 API 元素将从以后的版本中删除。
      获取药水的类型,类型与每种可制作的药水相匹配。

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

      返回:
      药水类型
    • isUpgraded

      public boolean isUpgraded()
      已过时, 待删除: 此 API 元素将从以后的版本中删除。
      检查药水是否处于升级状态。这指的是药水是否为第二级,例如抗火药水 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.

      返回:
      如果药水已升级则返回 true
    • isExtended

      public boolean isExtended()
      已过时, 待删除: 此 API 元素将从以后的版本中删除。
      检查药水是否处于延长状态。这指的是延长持续时间的药水。

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

      返回:
      如果药水已延长则返回 true
    • hashCode

      public int hashCode()
      已过时, 待删除: 此 API 元素将从以后的版本中删除。
      覆盖:
      hashCode 在类中 Object
    • equals

      public boolean equals(Object obj)
      已过时, 待删除: 此 API 元素将从以后的版本中删除。
      覆盖:
      equals 在类中 Object