summaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
authornathat890 <nathat890@outlook.com>2018-11-23 16:15:26 +0000
committermd_5 <git@md-5.net>2018-11-28 20:49:35 +1100
commit0c1d258bb8185c39ce12c816a826973e94939b0e (patch)
tree44614239cf173159fa8506e8c4ac3efb23ade66e /src/main/java
parent9a793cce8c9257ce85069c531486f369ad6328f1 (diff)
downloadbukkit-0c1d258bb8185c39ce12c816a826973e94939b0e.tar
bukkit-0c1d258bb8185c39ce12c816a826973e94939b0e.tar.gz
bukkit-0c1d258bb8185c39ce12c816a826973e94939b0e.tar.lz
bukkit-0c1d258bb8185c39ce12c816a826973e94939b0e.tar.xz
bukkit-0c1d258bb8185c39ce12c816a826973e94939b0e.zip
Make PigZapEvent extend EntityTransformEvent
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/org/bukkit/event/entity/PigZapEvent.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main/java/org/bukkit/event/entity/PigZapEvent.java b/src/main/java/org/bukkit/event/entity/PigZapEvent.java
index aa80ebf1..86983676 100644
--- a/src/main/java/org/bukkit/event/entity/PigZapEvent.java
+++ b/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;
}