Fix Witch Throw Potion error - Resolves #1129

This commit is contained in:
Aikar
2018-05-23 23:08:04 -04:00
parent bd9e73a2c6
commit efe156b1f7
2 changed files with 7 additions and 7 deletions

View File

@@ -6,13 +6,13 @@ Subject: [PATCH] WitchThrowPotionEvent
Fired when a witch throws a potion at a player
diff --git a/src/main/java/com/destroystokyo/paper/event/entity/WitchThrowPotionEvent.java b/src/main/java/com/destroystokyo/paper/event/entity/WitchThrowPotionEvent.java
index 6ef6367b..2f4ce49e 100644
index 6ef6367b..77487e28 100644
--- a/src/main/java/com/destroystokyo/paper/event/entity/WitchThrowPotionEvent.java
+++ b/src/main/java/com/destroystokyo/paper/event/entity/WitchThrowPotionEvent.java
@@ -0,0 +0,0 @@
package com.destroystokyo.paper.event.entity;
+import org.bukkit.entity.Player;
+import org.bukkit.entity.LivingEntity;
+import org.bukkit.entity.Witch;
import org.bukkit.event.Cancellable;
-import org.bukkit.event.Event;
@@ -26,10 +26,10 @@ index 6ef6367b..2f4ce49e 100644
+ * Fired when a witch throws a potion at a player
+ */
+public class WitchThrowPotionEvent extends EntityEvent implements Cancellable {
+ private final Player target;
+ private final LivingEntity target;
+ private ItemStack potion;
+
+ public WitchThrowPotionEvent(Witch witch, Player target, ItemStack potion) {
+ public WitchThrowPotionEvent(Witch witch, LivingEntity target, ItemStack potion) {
+ super(witch);
+ this.target = target;
+ this.potion = potion;
@@ -43,7 +43,7 @@ index 6ef6367b..2f4ce49e 100644
+ /**
+ * @return The target of the potion
+ */
+ public Player getTarget() {
+ public LivingEntity getTarget() {
+ return target;
+ }
+