Package org.bukkit.block
Interface Beacon
- All Superinterfaces:
- BlockState,- Lockable,- LockableTileState,- Metadatable,- Nameable,- PersistentDataHolder,- TileState
Represents a captured state of a beacon.
- 
Method SummaryModifier and TypeMethodDescriptiondoubleGets the effect range of this beacon.Returns the list of players within the beacon's range of effect.Returns the primary effect set on the beaconReturns the secondary effect set on the beacon.intgetTier()Returns the tier of the beacon pyramid (0-4).voidResets the custom range from this beacon and falls back to the range based on the the beacon tier.voidsetEffectRange(double range) Sets the effect range of the beacon A negative range value means the beacon is using its default range based on tier.voidSet the primary effect on this beacon, or null to clear.voidSet the secondary effect on this beacon, or null to clear.Methods inherited from interface org.bukkit.block.BlockStategetBlock, getBlockData, getChunk, getData, getDrops, getDrops, getDrops, getLightLevel, getLocation, getLocation, getRawData, getType, getWorld, getX, getY, getZ, isCollidable, isPlaced, setBlockData, setData, setRawData, setType, update, update, updateMethods inherited from interface org.bukkit.metadata.MetadatablegetMetadata, hasMetadata, removeMetadata, setMetadataMethods inherited from interface org.bukkit.NameablecustomName, customName, getCustomName, setCustomNameMethods inherited from interface org.bukkit.block.TileStategetPersistentDataContainer, isSnapshot
- 
Method Details- 
getEntitiesInRangeReturns 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
 
- 
getPrimaryEffectReturns the primary effect set on the beacon- Returns:
- the primary effect or null if not set
 
- 
setPrimaryEffectSet the primary effect on this beacon, or null to clear.- Parameters:
- effect- new primary effect
 
- 
getSecondaryEffectReturns the secondary effect set on the beacon.- Returns:
- the secondary effect or null if no secondary effect
 
- 
setSecondaryEffectSet 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
 
- 
getEffectRangedouble getEffectRange()Gets the effect range of this beacon. A negative range value means the beacon is using its default range based on tier.- Returns:
- Either the custom range set with setEffectRange(double)or the range based on the beacon tier.
 
- 
setEffectRangevoid setEffectRange(double range) Sets the effect range of the beacon A negative range value means the beacon is using its default range based on tier.- Parameters:
- range- Radius of effect range.
 
- 
resetEffectRangevoid resetEffectRange()Resets the custom range from this beacon and falls back to the range based on the the beacon tier. Shortcut for setting the effect range to a negative number.
 
-