Fix Witch Throw Potion error - Resolves #1129
This commit is contained in:
parent
aedd155be1
commit
3eb1cdef72
2 changed files with 9 additions and 9 deletions
|
@ -1,4 +1,4 @@
|
|||
From dc665a8ed1861da017603e6be0f484fce75a8ff5 Mon Sep 17 00:00:00 2001
|
||||
From 03b5a5e31bb52b1eefb424ba06b975649b32dd40 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Wed, 16 May 2018 20:39:09 -0400
|
||||
Subject: [PATCH] WitchThrowPotionEvent
|
||||
|
@ -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
|
||||
@@ -1,13 +1,51 @@
|
||||
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;
|
||||
+ }
|
||||
+
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue