diff options
author | md_5 <git@md-5.net> | 2016-07-23 10:29:30 +1000 |
---|---|---|
committer | md_5 <git@md-5.net> | 2016-07-23 10:48:50 +1000 |
commit | 465097d972a055c063d134e0434f5ae2cc6ef46a (patch) | |
tree | 24b4f0f811e64841d055171dbd88ae813ac727e8 /src | |
parent | e73ec6b833d245ce3c984d6da1cccb22fbe9f3e5 (diff) | |
download | bukkit-465097d972a055c063d134e0434f5ae2cc6ef46a.tar bukkit-465097d972a055c063d134e0434f5ae2cc6ef46a.tar.gz bukkit-465097d972a055c063d134e0434f5ae2cc6ef46a.tar.lz bukkit-465097d972a055c063d134e0434f5ae2cc6ef46a.tar.xz bukkit-465097d972a055c063d134e0434f5ae2cc6ef46a.zip |
Implement basic Beacon Block API
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/org/bukkit/block/Beacon.java | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/block/Beacon.java b/src/main/java/org/bukkit/block/Beacon.java index 2de0583c..9af251de 100644 --- a/src/main/java/org/bukkit/block/Beacon.java +++ b/src/main/java/org/bukkit/block/Beacon.java @@ -1,9 +1,42 @@ package org.bukkit.block; +import java.util.Collection; +import org.bukkit.entity.LivingEntity; import org.bukkit.inventory.InventoryHolder; +import org.bukkit.potion.PotionEffect; /** * Represents a beacon. */ public interface Beacon extends BlockState, InventoryHolder { + + /** + * Returns the list of players within the beacon's range of effect. + * + * @return the players in range + */ + 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 + */ + PotionEffect getPrimaryEffect(); + + /** + * Returns the secondary effect set on the beacon. + * + * @return the secondary effect or null if no secondary effect + */ + PotionEffect getSecondaryEffect(); } |