Commits
Doc authored and md_5 committed b252cf058ae
1 1 | package org.bukkit.entity; |
2 2 | |
3 + | import java.util.List; |
4 + | import org.bukkit.potion.PotionEffect; |
5 + | import org.bukkit.potion.PotionEffectType; |
3 6 | import org.jetbrains.annotations.NotNull; |
4 7 | |
5 8 | /** |
6 9 | * Represents a mushroom {@link Cow} |
7 10 | */ |
8 11 | public interface MushroomCow extends Cow { |
9 12 | |
13 + | /** |
14 + | * Checks for the presence of custom potion effects to be applied to the |
15 + | * next suspicious stew received from milking this {@link MushroomCow}. |
16 + | * |
17 + | * @return true if custom potion effects are applied to the stew |
18 + | */ |
19 + | boolean hasEffectsForNextStew(); |
20 + | |
21 + | /** |
22 + | * Gets an immutable list containing all custom potion effects applied to |
23 + | * the next suspicious stew received from milking this {@link MushroomCow}. |
24 + | * <p> |
25 + | * Plugins should check that hasCustomEffects() returns true before calling |
26 + | * this method. |
27 + | * |
28 + | * @return an immutable list of custom potion effects |
29 + | */ |
30 + | |
31 + | List<PotionEffect> getEffectsForNextStew(); |
32 + | |
33 + | /** |
34 + | * Adds a custom potion effect to be applied to the next suspicious stew |
35 + | * received from milking this {@link MushroomCow}. |
36 + | * |
37 + | * @param effect the potion effect to add |
38 + | * @param overwrite true if any existing effect of the same type should be |
39 + | * overwritten |
40 + | * @return true if the effects to be applied to the suspicious stew changed |
41 + | * as a result of this call |
42 + | */ |
43 + | boolean addEffectToNextStew( PotionEffect effect, boolean overwrite); |
44 + | |
45 + | /** |
46 + | * Removes a custom potion effect from being applied to the next suspicious |
47 + | * stew received from milking this {@link MushroomCow}. |
48 + | * |
49 + | * @param type the potion effect type to remove |
50 + | * @return true if the effects to be applied to the suspicious stew changed |
51 + | * as a result of this call |
52 + | */ |
53 + | boolean removeEffectFromNextStew( PotionEffectType type); |
54 + | |
55 + | /** |
56 + | * Checks for a specific custom potion effect type to be applied to the next |
57 + | * suspicious stew received from milking this {@link MushroomCow}. |
58 + | * |
59 + | * @param type the potion effect type to check for |
60 + | * @return true if the suspicious stew to be generated has this effect |
61 + | */ |
62 + | boolean hasEffectForNextStew( PotionEffectType type); |
63 + | |
64 + | /** |
65 + | * Removes all custom potion effects to be applied to the next suspicious |
66 + | * stew received from milking this {@link MushroomCow}. |
67 + | */ |
68 + | void clearEffectsForNextStew(); |
69 + | |
10 70 | /** |
11 71 | * Get the variant of this cow. |
12 72 | * |
13 73 | * @return cow variant |
14 74 | */ |
15 75 | |
16 76 | public Variant getVariant(); |
17 77 | |
18 78 | /** |
19 79 | * Set the variant of this cow. |