Package org.bukkit.potion
Enum Class PotionType
- All Implemented Interfaces:
- FeatureDependant,- Serializable,- Comparable<PotionType>,- Constable,- Keyed,- Keyed
This enum reflects and matches each potion state that can be obtained from
 the Creative mode inventory
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic interfaceDeprecated, for removal: This API element is subject to removal in a future version.Do not use, interface will get removed, and the plugin won't runNested classes/interfaces inherited from class java.lang.EnumEnum.EnumDesc<E extends Enum<E>>
- 
Enum Constant SummaryEnum ConstantsEnum ConstantDescription
- 
Method SummaryModifier and TypeMethodDescriptionstatic @Nullable PotionTypegetByEffect(@Nullable PotionEffectType effectType) Deprecated.MisleadingDeprecated.Potions can have multiple effects usegetPotionEffects()getKey()Return the namespaced identifier for this object.intbooleanChecks if the potion type has an extended state.booleanDeprecated.PotionType can have multiple effects, some of which can be instant and others not.booleanChecks if the potion type has an upgraded state.static PotionTypeReturns the enum constant of this class with the specified name.static PotionType[]values()Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enumclone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOfMethods inherited from interface io.papermc.paper.world.flag.FeatureDependantrequiredFeatures
- 
Enum Constant Details- 
AWKWARD
- 
FIRE_RESISTANCE
- 
HARMING
- 
HEALING
- 
INFESTED
- 
INVISIBILITY
- 
LEAPING
- 
LONG_FIRE_RESISTANCE
- 
LONG_INVISIBILITY
- 
LONG_LEAPING
- 
LONG_NIGHT_VISION
- 
LONG_POISON
- 
LONG_REGENERATION
- 
LONG_SLOW_FALLING
- 
LONG_SLOWNESS
- 
LONG_STRENGTH
- 
LONG_SWIFTNESS
- 
LONG_TURTLE_MASTER
- 
LONG_WATER_BREATHING
- 
LONG_WEAKNESS
- 
LUCK
- 
MUNDANE
- 
NIGHT_VISION
- 
OOZING
- 
POISON
- 
REGENERATION
- 
SLOW_FALLING
- 
SLOWNESS
- 
STRENGTH
- 
STRONG_HARMING
- 
STRONG_HEALING
- 
STRONG_LEAPING
- 
STRONG_POISON
- 
STRONG_REGENERATION
- 
STRONG_SLOWNESS
- 
STRONG_STRENGTH
- 
STRONG_SWIFTNESS
- 
STRONG_TURTLE_MASTER
- 
SWIFTNESS
- 
THICK
- 
TURTLE_MASTER
- 
WATER
- 
WATER_BREATHING
- 
WEAKNESS
- 
WEAVING
- 
WIND_CHARGED
 
- 
- 
Method Details- 
valuesReturns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
 
- 
valueOfReturns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
- name- the name of the enum constant to be returned.
- Returns:
- the enum constant with the specified name
- Throws:
- IllegalArgumentException- if this enum class has no constant with the specified name
- NullPointerException- if the argument is null
 
- 
getEffectTypeDeprecated.Potions can have multiple effects usegetPotionEffects()- Returns:
- the potion effect type of this potion type
 
- 
getPotionEffects- Returns:
- a list of all effects this potion type has
 
- 
isInstantDeprecated.PotionType can have multiple effects, some of which can be instant and others not. UsePotionEffectType.isInstant()in combination withgetPotionEffects()andPotionEffect.getType()- Returns:
- if this potion type is instant
 
- 
isUpgradeablepublic boolean isUpgradeable()Checks if the potion type has an upgraded state. This refers to whether or not the potion type can be Tier 2, such as Potion of Fire Resistance II.- Returns:
- true if the potion type can be upgraded;
 
- 
isExtendablepublic boolean isExtendable()Checks if the potion type has an extended state. This refers to the extended duration potions- Returns:
- true if the potion type can be extended
 
- 
getMaxLevelpublic int getMaxLevel()
- 
getByEffect@Deprecated(since="1.9") @Nullable public static @Nullable PotionType getByEffect(@Nullable @Nullable PotionEffectType effectType) Deprecated.Misleading- Parameters:
- effectType- the effect to get by
- Returns:
- the matching potion type
 
- 
getKeyDescription copied from interface:KeyedReturn the namespaced identifier for this object.
 
-