mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-08 19:34:09 +01:00
Make PigZapEvent extend EntityTransformEvent
By: nathat890 <nathat890@outlook.com>
This commit is contained in:
parent
0face3d06a
commit
4d2079401c
1 changed files with 4 additions and 2 deletions
|
@ -9,14 +9,14 @@ import org.bukkit.event.HandlerList;
|
||||||
/**
|
/**
|
||||||
* Stores data for pigs being zapped
|
* 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 static final HandlerList handlers = new HandlerList();
|
||||||
private boolean canceled;
|
private boolean canceled;
|
||||||
private final PigZombie pigzombie;
|
private final PigZombie pigzombie;
|
||||||
private final LightningStrike bolt;
|
private final LightningStrike bolt;
|
||||||
|
|
||||||
public PigZapEvent(final Pig pig, final LightningStrike bolt, final PigZombie pigzombie) {
|
public PigZapEvent(final Pig pig, final LightningStrike bolt, final PigZombie pigzombie) {
|
||||||
super(pig);
|
super(pig, pigzombie, TransformReason.LIGHTNING);
|
||||||
this.bolt = bolt;
|
this.bolt = bolt;
|
||||||
this.pigzombie = pigzombie;
|
this.pigzombie = pigzombie;
|
||||||
}
|
}
|
||||||
|
@ -48,7 +48,9 @@ public class PigZapEvent extends EntityEvent implements Cancellable {
|
||||||
* not cancelled first.
|
* not cancelled first.
|
||||||
*
|
*
|
||||||
* @return resulting entity
|
* @return resulting entity
|
||||||
|
* @deprecated use {@link EntityTransformEvent#getTransformedEntity()}
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
public PigZombie getPigZombie() {
|
public PigZombie getPigZombie() {
|
||||||
return pigzombie;
|
return pigzombie;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue