Add javadocs to BeaconEffectEvent

This commit is contained in:
Byteflux 2015-07-23 21:41:35 -07:00
parent c9ff2e2b51
commit 7a75de5fb8

View File

@ -19,6 +19,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+import org.bukkit.event.block.BlockEvent; +import org.bukkit.event.block.BlockEvent;
+import org.bukkit.potion.PotionEffect; +import org.bukkit.potion.PotionEffect;
+ +
+/**
+ * Called when a beacon effect is being applied to a player.
+ */
+public class BeaconEffectEvent extends BlockEvent implements Cancellable { +public class BeaconEffectEvent extends BlockEvent implements Cancellable {
+ private static final HandlerList handlers = new HandlerList(); + private static final HandlerList handlers = new HandlerList();
+ private boolean cancelled; + private boolean cancelled;
@ -43,18 +46,38 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ this.cancelled = cancelled; + this.cancelled = cancelled;
+ } + }
+ +
+ /**
+ * Gets the potion effect being applied.
+ *
+ * @return Potion effect
+ */
+ public PotionEffect getEffect() { + public PotionEffect getEffect() {
+ return effect; + return effect;
+ } + }
+ +
+ /**
+ * Sets the potion effect that will be applied.
+ *
+ * @param effect Potion effect
+ */
+ public void setEffect(PotionEffect effect) { + public void setEffect(PotionEffect effect) {
+ this.effect = effect; + this.effect = effect;
+ } + }
+ +
+ /**
+ * Gets the player who the potion effect is being applied to.
+ *
+ * @return Affected player
+ */
+ public Player getPlayer() { + public Player getPlayer() {
+ return player; + return player;
+ } + }
+ +
+ /**
+ * Gets whether the effect is a primary beacon effect.
+ *
+ * @return true if this event represents a primary effect
+ */
+ public boolean isPrimary() { + public boolean isPrimary() {
+ return primary; + return primary;
+ } + }