Package org.bukkit.block
Interface Beacon
- 
- All Superinterfaces:
- BlockState,- Lockable,- Metadatable,- Nameable,- PersistentDataHolder,- TileState
 
 public interface Beacon extends TileState, Lockable, Nameable Represents a captured state of a beacon.
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description Collection<LivingEntity>getEntitiesInRange()Returns the list of players within the beacon's range of effect.PotionEffectgetPrimaryEffect()Returns the primary effect set on the beaconPotionEffectgetSecondaryEffect()Returns the secondary effect set on the beacon.intgetTier()Returns the tier of the beacon pyramid (0-4).voidsetPrimaryEffect(PotionEffectType effect)Set the primary effect on this beacon, or null to clear.voidsetSecondaryEffect(PotionEffectType effect)Set the secondary effect on this beacon, or null to clear.- 
Methods inherited from interface org.bukkit.block.BlockStategetBlock, getBlockData, getChunk, getData, getLightLevel, getLocation, getLocation, getRawData, getType, getWorld, getX, getY, getZ, isPlaced, setBlockData, setData, setRawData, setType, update, update, update
 - 
Methods inherited from interface org.bukkit.metadata.MetadatablegetMetadata, hasMetadata, removeMetadata, setMetadata
 - 
Methods inherited from interface org.bukkit.NameablegetCustomName, setCustomName
 - 
Methods inherited from interface org.bukkit.block.TileStategetPersistentDataContainer
 
- 
 
- 
- 
- 
Method Detail- 
getEntitiesInRange@NotNull Collection<LivingEntity> getEntitiesInRange() Returns the list of players within the beacon's range of effect.This will return an empty list if the block represented by this state is no longer a beacon. - Returns:
- the players in range
- Throws:
- IllegalStateException- if this block state is not placed
 
 - 
getTierint getTier() 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.- Returns:
- the beacon tier
 
 - 
getPrimaryEffect@Nullable PotionEffect getPrimaryEffect() Returns the primary effect set on the beacon- Returns:
- the primary effect or null if not set
 
 - 
setPrimaryEffectvoid setPrimaryEffect(@Nullable PotionEffectType effect)Set the primary effect on this beacon, or null to clear.- Parameters:
- effect- new primary effect
 
 - 
getSecondaryEffect@Nullable PotionEffect getSecondaryEffect() Returns the secondary effect set on the beacon.- Returns:
- the secondary effect or null if no secondary effect
 
 - 
setSecondaryEffectvoid setSecondaryEffect(@Nullable PotionEffectType effect)Set the secondary effect on this beacon, or null to clear. Note that tier must be >= 4 for this effect to be active.- Parameters:
- effect- desired secondary effect
 
 
- 
 
-