Package org.bukkit.potion

# Interface PotionBrewer

public interface PotionBrewer
Represents a brewer that can create `PotionEffect`s.

## Method Summary

Modifier and Type
Method
Description
`void`
`addPotionMix(PotionMix potionMix)`
Adds a new potion mix recipe.
`@NotNull PotionEffect`
`createEffect(@NotNull PotionEffectType potion, int duration, int amplifier)`
Creates a `PotionEffect` from the given `PotionEffectType`, applying duration modifiers and checks.
`@NotNull Collection<PotionEffect>`
`getEffects(@NotNull PotionType type, boolean upgraded, boolean extended)`
Returns a collection of `PotionEffect` that would be applied from a potion with the given type.
`@NotNull Collection<PotionEffect>`
`getEffectsFromDamage(int damage)`
Deprecated.
Non-Functional
`void`
`removePotionMix(NamespacedKey key)`
Removes a potion mix recipe.
`void`
`resetPotionMixes()`
Resets potion mixes to their default, removing all custom ones.

## Method Details

### createEffect

@NotNull @NotNull PotionEffect createEffect(@NotNull @NotNull PotionEffectType potion, int duration, int amplifier)
Creates a `PotionEffect` from the given `PotionEffectType`, applying duration modifiers and checks.

Parameters:
  `potion` - The type of potion
  `duration` - The duration in ticks
  `amplifier` - The amplifier of the effect
Returns:
  The resulting potion effect

### getEffectsFromDamage

@Deprecated @NotNull @NotNull Collection<PotionEffect> getEffectsFromDamage(int damage)
Deprecated.
Non-Functional
Returns a collection of `PotionEffect` that 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 @NotNull Collection<PotionEffect> getEffects(@NotNull @NotNull PotionType type, boolean upgraded, boolean extended)
Returns a collection of `PotionEffect` that would be applied from a potion with the given type.

Parameters:
  `type` - The type of the potion
  `upgraded` - Whether the potion is upgraded
  `extended` - Whether the potion is extended
Returns:
  The list of effects

### addPotionMix

void addPotionMix(@NotNull PotionMix potionMix)
Adds a new potion mix recipe.

Parameters:
  `potionMix` - the potion mix to add

### removePotionMix

void removePotionMix(@NotNull NamespacedKey key)
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.