Yatopia/patches/api/0009-EMC-EntityKnockbackEvent.patch
2020-06-23 01:09:14 +02:00

63 lines
1.8 KiB
Diff

From 28f9faf0a305cb6b46b143d28e06ba150b568b14 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 4 Dec 2016 01:19:01 -0500
Subject: [PATCH] EMC EntityKnockbackEvent
---
.../customevents/EntityKnockbackEvent.java | 43 +++++++++++++++++++
1 file changed, 43 insertions(+)
create mode 100644 src/main/java/com/empireminecraft/customevents/EntityKnockbackEvent.java
diff --git a/src/main/java/com/empireminecraft/customevents/EntityKnockbackEvent.java b/src/main/java/com/empireminecraft/customevents/EntityKnockbackEvent.java
new file mode 100644
index 000000000..5e10e241b
--- /dev/null
+++ b/src/main/java/com/empireminecraft/customevents/EntityKnockbackEvent.java
@@ -0,0 +1,43 @@
+package com.empireminecraft.customevents;
+
+import org.bukkit.entity.LivingEntity;
+import org.bukkit.event.Event;
+import org.bukkit.event.HandlerList;
+
+public class EntityKnockbackEvent extends Event {
+ private final LivingEntity attackingEntity;
+ private final LivingEntity targetEntity;
+ private int level;
+
+ public EntityKnockbackEvent(LivingEntity attackingEntity, LivingEntity targetEntity, int level) {
+ this.attackingEntity = attackingEntity;
+ this.targetEntity = targetEntity;
+ this.level = level;
+ }
+
+ public LivingEntity getAttackingEntity() {
+ return attackingEntity;
+ }
+
+ public LivingEntity getTargetEntity() {
+ return targetEntity;
+ }
+
+ public int getLevel() {
+ return level;
+ }
+
+ public void setLevel(int level) {
+ this.level = level;
+ }
+
+ private static final HandlerList handlers = new HandlerList();
+
+ public HandlerList getHandlers() {
+ return handlers;
+ }
+
+ public static HandlerList getHandlerList() {
+ return handlers;
+ }
+}
--
2.25.1.windows.1