Package org.bukkit.potion
Class PotionData
- java.lang.Object
-
- org.bukkit.potion.PotionData
-
public final class PotionData extends Object
-
-
Constructor Summary
Constructors Constructor Description PotionData(PotionType type)
PotionData(PotionType type, boolean extended, boolean upgraded)
Instantiates a final PotionData object to contain information about a Potion
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
PotionType
getType()
Gets the type of the potion, Type matches up with each kind of craftable potionint
hashCode()
boolean
isExtended()
Checks if the potion is in an extended state.boolean
isUpgraded()
Checks if the potion is in an upgraded state.
-
-
-
Constructor Detail
-
PotionData
public PotionData(@NotNull PotionType type, boolean extended, boolean upgraded)
Instantiates a final PotionData object to contain information about a Potion- Parameters:
type
- the type of the Potionextended
- whether the potion is extended PotionType#isExtendable() must be trueupgraded
- whether the potion is upgraded PotionType#isUpgradable() must be true
-
PotionData
public PotionData(@NotNull PotionType type)
-
-
Method Detail
-
getType
@NotNull public PotionType getType()
Gets the type of the potion, Type matches up with each kind of craftable potion- Returns:
- the potion type
-
isUpgraded
public boolean isUpgraded()
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()
Checks if the potion is in an extended state. This refers to the extended duration potions- Returns:
- true if the potion is extended
-
-