summaryrefslogtreecommitdiffstats
path: root/src/main/java/org/bukkit/potion/PotionBrewer.java
blob: 7d8318cfefd4ce3a1ec47071caa71f5b79eaf7ee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package org.bukkit.potion;

import java.util.Collection;

/**
 * Represents a brewer that can create {@link PotionEffect}s.
 */
public interface PotionBrewer {
    /**
     * Creates a {@link PotionEffect} from the given {@link PotionEffectType},
     * applying duration modifiers and checks.
     *
     * @param potion The type of potion
     * @param duration The duration in ticks
     * @param amplifier The amplifier of the effect
     * @return The resulting potion effect
     */
    public PotionEffect createEffect(PotionEffectType potion, int duration, int amplifier);

    /**
     * Returns a collection of {@link PotionEffect} that would be applied from a
     * potion with the given data value.
     *
     * @param damage The data value of the potion
     * @return The list of effects
     */
    public Collection<PotionEffect> getEffectsFromDamage(int damage);
}