blob: 97d3921319e324c0e886e4f15b901f7d3f090cb0 (
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
package org.bukkit.block;
import java.util.Collection;
import org.bukkit.Nameable;
import org.bukkit.entity.LivingEntity;
import org.bukkit.inventory.BeaconInventory;
import org.bukkit.potion.PotionEffect;
import org.bukkit.potion.PotionEffectType;
/**
* Represents a captured state of a beacon.
*/
public interface Beacon extends Container, Nameable {
@Override
BeaconInventory getInventory();
@Override
BeaconInventory getSnapshotInventory();
/**
* Returns the list of players within the beacon's range of effect.
* <p>
* This will return an empty list if the block represented by this state is
* no longer a beacon.
*
* @return the players in range
* @throws IllegalStateException if this block state is not placed
*/
Collection<LivingEntity> getEntitiesInRange();
/**
* Returns the tier of the beacon pyramid (0-4). The tier refers to the
* beacon's power level, based on how many layers of blocks are in the
* pyramid. Tier 1 refers to a beacon with one layer of 9 blocks under it.
*
* @return the beacon tier
*/
int getTier();
/**
* Returns the primary effect set on the beacon
*
* @return the primary effect or null if not set
*/
PotionEffect getPrimaryEffect();
/**
* Set the primary effect on this beacon, or null to clear.
*
* @param effect new primary effect
*/
void setPrimaryEffect(PotionEffectType effect);
/**
* Returns the secondary effect set on the beacon.
*
* @return the secondary effect or null if no secondary effect
*/
PotionEffect getSecondaryEffect();
/**
* Set the secondary effect on this beacon, or null to clear. Note that tier
* must be >= 4 for this effect to be active.
*
* @param effect desired secondary effect
*/
void setSecondaryEffect(PotionEffectType effect);
}
|