Package org.bukkit.potion
Interface PotionBrewer
public interface PotionBrewer
Used to manage custom
PotionMixs.-
Method Summary
Modifier and TypeMethodDescriptionvoidaddPotionMix(PotionMix potionMix) Adds a new potion mix recipe.default @NotNull PotionEffectcreateEffect(@NotNull PotionEffectType potion, int duration, int amplifier) Deprecated, for removal: This API element is subject to removal in a future version.getEffects(@NotNull PotionType type, boolean upgraded, boolean extended) Deprecated, for removal: This API element is subject to removal in a future version.Upgraded / extended potions are now their ownPotionTypeusePotionType.getPotionEffects()insteaddefault @NotNull Collection<PotionEffect> getEffectsFromDamage(int damage) Deprecated, for removal: This API element is subject to removal in a future version.Non-FunctionalvoidRemoves a potion mix recipe.voidResets potion mixes to their default, removing all custom ones.
-
Method Details
-
addPotionMix
Adds a new potion mix recipe.- Parameters:
potionMix- the potion mix to add
-
removePotionMix
Removes a potion mix recipe.- Parameters:
key- the key of the mix to remove
-
resetPotionMixes
void resetPotionMixes()Resets potion mixes to their default, removing all custom ones. -
createEffect
@Deprecated(forRemoval=true, since="1.20.5") @NotNull default @NotNull PotionEffect createEffect(@NotNull @NotNull PotionEffectType potion, int duration, int amplifier) Deprecated, for removal: This API element is subject to removal in a future version.usePotionEffectType.createEffect(int, int)instead.Creates aPotionEffectfrom the givenPotionEffectType, applying duration modifiers and checks.- Parameters:
potion- The type of potionduration- The duration in ticksamplifier- The amplifier of the effect- Returns:
- The resulting potion effect
-
getEffectsFromDamage
@Deprecated(since="1.6.2", forRemoval=true) @NotNull default @NotNull Collection<PotionEffect> getEffectsFromDamage(int damage) Deprecated, for removal: This API element is subject to removal in a future version.Non-FunctionalReturns a collection ofPotionEffectthat would be applied from a potion with the given data value.- Parameters:
damage- The data value of the potion- Returns:
- The list of effects
-
getEffects
@NotNull @Deprecated(since="1.20.2", forRemoval=true) @NotNull Collection<PotionEffect> getEffects(@NotNull @NotNull PotionType type, boolean upgraded, boolean extended) Deprecated, for removal: This API element is subject to removal in a future version.Upgraded / extended potions are now their ownPotionTypeusePotionType.getPotionEffects()insteadReturns a collection ofPotionEffectthat would be applied from a potion with the given type.- Parameters:
type- The type of the potionupgraded- Whether the potion is upgradedextended- Whether the potion is extended- Returns:
- The list of effects
-
PotionEffectType.createEffect(int, int)instead.