2020-02-26 21:44:51 +01:00
|
|
|
From 791e304ae7dee6a6361645f31a0a07f8e88617a6 Mon Sep 17 00:00:00 2001
|
2020-02-26 20:12:29 +01:00
|
|
|
From: Aikar <aikar@aikar.co>
|
|
|
|
Date: Sun, 4 Dec 2016 14:59:41 -0500
|
|
|
|
Subject: [PATCH] EMC EntityEffectAddedEvent
|
|
|
|
|
|
|
|
---
|
|
|
|
.../customevents/EntityEffectAddedEvent.java | 49 +++++++++++++++++++
|
|
|
|
1 file changed, 49 insertions(+)
|
|
|
|
create mode 100644 src/main/java/com/empireminecraft/customevents/EntityEffectAddedEvent.java
|
|
|
|
|
|
|
|
diff --git a/src/main/java/com/empireminecraft/customevents/EntityEffectAddedEvent.java b/src/main/java/com/empireminecraft/customevents/EntityEffectAddedEvent.java
|
|
|
|
new file mode 100644
|
|
|
|
index 00000000..4695943b
|
|
|
|
--- /dev/null
|
|
|
|
+++ b/src/main/java/com/empireminecraft/customevents/EntityEffectAddedEvent.java
|
|
|
|
@@ -0,0 +1,49 @@
|
|
|
|
+package com.empireminecraft.customevents;
|
|
|
|
+
|
|
|
|
+import org.bukkit.entity.LivingEntity;
|
|
|
|
+import org.bukkit.event.Cancellable;
|
|
|
|
+import org.bukkit.event.Event;
|
|
|
|
+import org.bukkit.event.HandlerList;
|
|
|
|
+import org.bukkit.potion.PotionEffect;
|
|
|
|
+
|
|
|
|
+public class EntityEffectAddedEvent extends Event implements Cancellable {
|
|
|
|
+ private static final HandlerList handlers = new HandlerList();
|
|
|
|
+ private boolean canceled;
|
|
|
|
+
|
|
|
|
+ private final LivingEntity entity;
|
|
|
|
+ private PotionEffect effect;
|
|
|
|
+
|
|
|
|
+ public EntityEffectAddedEvent(LivingEntity entity, PotionEffect effect) {
|
|
|
|
+ this.entity = entity;
|
|
|
|
+ this.effect = effect;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public PotionEffect getEffect() {
|
|
|
|
+ return effect;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public void setEffect(PotionEffect effect) {
|
|
|
|
+ this.effect = effect;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public LivingEntity getEntity() {
|
|
|
|
+ return entity;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public boolean isCancelled() {
|
|
|
|
+ return canceled;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public void setCancelled(boolean cancel) {
|
|
|
|
+ canceled = cancel;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public HandlerList getHandlers() {
|
|
|
|
+ return handlers;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public static HandlerList getHandlerList() {
|
|
|
|
+ return handlers;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+}
|
|
|
|
--
|
|
|
|
2.25.1.windows.1
|
|
|
|
|