Commits

md_5 authored 057635bcd07
Enhance Beacon Block API with setters for effects
No tags

src/main/java/org/bukkit/block/Beacon.java

Modified
1 1 package org.bukkit.block;
2 2
3 3 import java.util.Collection;
4 4 import org.bukkit.entity.LivingEntity;
5 5 import org.bukkit.inventory.InventoryHolder;
6 6 import org.bukkit.potion.PotionEffect;
7 +import org.bukkit.potion.PotionEffectType;
7 8
8 9 /**
9 10 * Represents a beacon.
10 11 */
11 12 public interface Beacon extends BlockState, InventoryHolder {
12 13
13 14 /**
14 15 * Returns the list of players within the beacon's range of effect.
15 16 *
16 17 * @return the players in range
22 23 * beacon's power level, based on how many layers of blocks are in the
23 24 * pyramid. Tier 1 refers to a beacon with one layer of 9 blocks under it.
24 25 *
25 26 * @return the beacon tier
26 27 */
27 28 int getTier();
28 29
29 30 /**
30 31 * Returns the primary effect set on the beacon
31 32 *
32 - * @return the primary effect
33 + * @return the primary effect or null if not set
33 34 */
34 35 PotionEffect getPrimaryEffect();
35 36
37 + /**
38 + * Set the primary effect on this beacon, or null to clear.
39 + *
40 + * @param effect new primary effect
41 + */
42 + void setPrimaryEffect(PotionEffectType effect);
43 +
36 44 /**
37 45 * Returns the secondary effect set on the beacon.
38 46 *
39 47 * @return the secondary effect or null if no secondary effect
40 48 */
41 49 PotionEffect getSecondaryEffect();
50 +
51 + /**
52 + * Set the secondary effect on this beacon, or null to clear. Note that tier
53 + * must be >= 4 for this effect to be active.
54 + *
55 + * @param effect desired secondary effect
56 + */
57 + void setSecondaryEffect(PotionEffectType effect);
42 58 }

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut