From 4d2079401c6023bb57c72547587f11eb19444db5 Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Fri, 23 Nov 2018 16:15:26 +0000 Subject: [PATCH] Make PigZapEvent extend EntityTransformEvent By: nathat890 --- .../src/main/java/org/bukkit/event/entity/PigZapEvent.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/paper-api/src/main/java/org/bukkit/event/entity/PigZapEvent.java b/paper-api/src/main/java/org/bukkit/event/entity/PigZapEvent.java index aa80ebf1df..8698367679 100644 --- a/paper-api/src/main/java/org/bukkit/event/entity/PigZapEvent.java +++ b/paper-api/src/main/java/org/bukkit/event/entity/PigZapEvent.java @@ -9,14 +9,14 @@ import org.bukkit.event.HandlerList; /** * Stores data for pigs being zapped */ -public class PigZapEvent extends EntityEvent implements Cancellable { +public class PigZapEvent extends EntityTransformEvent implements Cancellable { private static final HandlerList handlers = new HandlerList(); private boolean canceled; private final PigZombie pigzombie; private final LightningStrike bolt; public PigZapEvent(final Pig pig, final LightningStrike bolt, final PigZombie pigzombie) { - super(pig); + super(pig, pigzombie, TransformReason.LIGHTNING); this.bolt = bolt; this.pigzombie = pigzombie; } @@ -48,7 +48,9 @@ public class PigZapEvent extends EntityEvent implements Cancellable { * not cancelled first. * * @return resulting entity + * @deprecated use {@link EntityTransformEvent#getTransformedEntity()} */ + @Deprecated public PigZombie getPigZombie() { return pigzombie; }