summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authormd_5 <git@md-5.net>2016-07-23 10:55:31 +1000
committermd_5 <git@md-5.net>2016-07-23 10:56:46 +1000
commit057635bcd07d37932f7077a62cc73bf7367d8142 (patch)
treea6bbc3fa3f43d446c8e61ca9fec76c8b05368154 /src
parent465097d972a055c063d134e0434f5ae2cc6ef46a (diff)
downloadbukkit-057635bcd07d37932f7077a62cc73bf7367d8142.tar
bukkit-057635bcd07d37932f7077a62cc73bf7367d8142.tar.gz
bukkit-057635bcd07d37932f7077a62cc73bf7367d8142.tar.lz
bukkit-057635bcd07d37932f7077a62cc73bf7367d8142.tar.xz
bukkit-057635bcd07d37932f7077a62cc73bf7367d8142.zip
Enhance Beacon Block API with setters for effects
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/bukkit/block/Beacon.java18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/main/java/org/bukkit/block/Beacon.java b/src/main/java/org/bukkit/block/Beacon.java
index 9af251de..7fd44434 100644
--- a/src/main/java/org/bukkit/block/Beacon.java
+++ b/src/main/java/org/bukkit/block/Beacon.java
@@ -4,6 +4,7 @@ import java.util.Collection;
import org.bukkit.entity.LivingEntity;
import org.bukkit.inventory.InventoryHolder;
import org.bukkit.potion.PotionEffect;
+import org.bukkit.potion.PotionEffectType;
/**
* Represents a beacon.
@@ -29,14 +30,29 @@ public interface Beacon extends BlockState, InventoryHolder {
/**
* Returns the primary effect set on the beacon
*
- * @return the primary effect
+ * @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);
}