mirror of
https://github.com/YatopiaMC/Yatopia.git
synced 2024-11-23 02:55:27 +01:00
63 lines
1.8 KiB
Diff
63 lines
1.8 KiB
Diff
From baec015c4d67215d5cdcf1abc3c006ddebbabaac 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 00000000..5e10e241
|
|
--- /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
|
|
|