BlockState
, Lockable
, Metadatable
, Nameable
, PersistentDataHolder
, TileState
public interface Beacon extends TileState, Lockable, Nameable
Modifier and Type | Method | Description |
---|---|---|
Collection<LivingEntity> |
getEntitiesInRange() |
Returns the list of players within the beacon's range of effect.
|
PotionEffect |
getPrimaryEffect() |
Returns the primary effect set on the beacon
|
PotionEffect |
getSecondaryEffect() |
Returns the secondary effect set on the beacon.
|
int |
getTier() |
Returns the tier of the beacon pyramid (0-4).
|
void |
setPrimaryEffect(PotionEffectType effect) |
Set the primary effect on this beacon, or null to clear.
|
void |
setSecondaryEffect(PotionEffectType effect) |
Set the secondary effect on this beacon, or null to clear.
|
getBlock, getBlockData, getChunk, getData, getLightLevel, getLocation, getLocation, getRawData, getType, getWorld, getX, getY, getZ, isPlaced, setBlockData, setData, setRawData, setType, update, update, update
getMetadata, hasMetadata, removeMetadata, setMetadata
getCustomName, setCustomName
getPersistentDataContainer
@NotNull Collection<LivingEntity> getEntitiesInRange()
This will return an empty list if the block represented by this state is no longer a beacon.
IllegalStateException
- if this block state is not placedint getTier()
@Nullable PotionEffect getPrimaryEffect()
void setPrimaryEffect(@Nullable PotionEffectType effect)
effect
- new primary effect@Nullable PotionEffect getSecondaryEffect()
void setSecondaryEffect(@Nullable PotionEffectType effect)
effect
- desired secondary effectCopyright © 2019. All rights reserved.