Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-18 12:30:06 +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>
|
||||
Date: Thu, 23 Jul 2015 11:45:20 -0700
|
||||
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
|
||||
new file mode 100644
|
||||
index 0000000..9bc14a2
|
||||
index 0000000..d9f9b95
|
||||
--- /dev/null
|
||||
+++ 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;
|
||||
+
|
||||
+import org.bukkit.block.Block;
|
||||
@ -19,6 +19,9 @@ index 0000000..9bc14a2
|
||||
+import org.bukkit.event.block.BlockEvent;
|
||||
+import org.bukkit.potion.PotionEffect;
|
||||
+
|
||||
+/**
|
||||
+ * Called when a beacon effect is being applied to a player.
|
||||
+ */
|
||||
+public class BeaconEffectEvent extends BlockEvent implements Cancellable {
|
||||
+ private static final HandlerList handlers = new HandlerList();
|
||||
+ private boolean cancelled;
|
||||
@ -43,18 +46,38 @@ index 0000000..9bc14a2
|
||||
+ this.cancelled = cancelled;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Gets the potion effect being applied.
|
||||
+ *
|
||||
+ * @return Potion effect
|
||||
+ */
|
||||
+ public PotionEffect getEffect() {
|
||||
+ return effect;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Sets the potion effect that will be applied.
|
||||
+ *
|
||||
+ * @param effect Potion effect
|
||||
+ */
|
||||
+ public void setEffect(PotionEffect effect) {
|
||||
+ this.effect = effect;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Gets the player who the potion effect is being applied to.
|
||||
+ *
|
||||
+ * @return Affected player
|
||||
+ */
|
||||
+ public Player getPlayer() {
|
||||
+ return player;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Gets whether the effect is a primary beacon effect.
|
||||
+ *
|
||||
+ * @return true if this event represents a primary effect
|
||||
+ */
|
||||
+ public boolean isPrimary() {
|
||||
+ return primary;
|
||||
+ }
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren