Class PotionData

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

@Deprecated(forRemoval=true) public final class PotionData extends Object
Deprecated, for removal: This API element is subject to removal in a future version.
Upgraded / extended potions are now their own PotionType use them instead.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    PotionData(PotionType type, boolean extended, boolean upgraded)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Instantiates a final PotionData object to contain information about a Potion
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    Deprecated, for removal: This API element is subject to removal in a future version.
    Gets the type of the potion, Type matches up with each kind of craftable potion
    int
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
    Checks if the potion is in an extended state.
    boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
    Checks if the potion is in an upgraded state.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • PotionData

      public PotionData(@NotNull PotionType type, boolean extended, boolean upgraded)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Instantiates a final PotionData object to contain information about a Potion
      Parameters:
      type - the type of the Potion
      extended - whether the potion is extended PotionType#isExtendable() must be true
      upgraded - whether the potion is upgraded PotionType#isUpgradable() must be true
    • PotionData

      public PotionData(@NotNull PotionType type)
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Method Details

    • getType

      @NotNull public PotionType getType()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Gets the type of the potion, Type matches up with each kind of craftable potion
      Returns:
      the potion type
    • isUpgraded

      public boolean isUpgraded()
      Deprecated, for removal: This API element is subject to removal in a future version.
      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.
      Returns:
      true if the potion is upgraded;
    • isExtended

      public boolean isExtended()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Checks if the potion is in an extended state. This refers to the extended duration potions
      Returns:
      true if the potion is extended
    • hashCode

      public int hashCode()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      equals in class Object