Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-18 20:40:08 +01:00
Add javadocs to BeaconEffectEvent
Dieser Commit ist enthalten in:
Ursprung
060c59ea95
Commit
83aa27a29d
@ -1,4 +1,4 @@
|
|||||||
From fb47713bc3aa1e7c44c50caacd86b3a29a275203 Mon Sep 17 00:00:00 2001
|
From 0a8f1851697e1c3c179be7bce30a9ca5977e3a82 Mon Sep 17 00:00:00 2001
|
||||||
From: Byteflux <byte@byteflux.net>
|
From: Byteflux <byte@byteflux.net>
|
||||||
Date: Thu, 23 Jul 2015 11:45:20 -0700
|
Date: Thu, 23 Jul 2015 11:45:20 -0700
|
||||||
Subject: [PATCH] Add BeaconEffectEvent
|
Subject: [PATCH] Add BeaconEffectEvent
|
||||||
@ -6,10 +6,10 @@ Subject: [PATCH] Add BeaconEffectEvent
|
|||||||
|
|
||||||
diff --git a/src/main/java/org/github/paperspigot/event/block/BeaconEffectEvent.java b/src/main/java/org/github/paperspigot/event/block/BeaconEffectEvent.java
|
diff --git a/src/main/java/org/github/paperspigot/event/block/BeaconEffectEvent.java b/src/main/java/org/github/paperspigot/event/block/BeaconEffectEvent.java
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 0000000..9bc14a2
|
index 0000000..d9f9b95
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/org/github/paperspigot/event/block/BeaconEffectEvent.java
|
+++ b/src/main/java/org/github/paperspigot/event/block/BeaconEffectEvent.java
|
||||||
@@ -0,0 +1,58 @@
|
@@ -0,0 +1,81 @@
|
||||||
+package org.github.paperspigot.event.block;
|
+package org.github.paperspigot.event.block;
|
||||||
+
|
+
|
||||||
+import org.bukkit.block.Block;
|
+import org.bukkit.block.Block;
|
||||||
@ -19,6 +19,9 @@ index 0000000..9bc14a2
|
|||||||
+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 0000000..9bc14a2
|
|||||||
+ 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;
|
||||||
+ }
|
+ }
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren