Class PigZapEvent

All Implemented Interfaces:
Cancellable

@Deprecated(since="26.2") public class PigZapEvent extends EntityZapEvent
Deprecated.
Stores data for pigs being zapped
Since:
1.0.0
  • Constructor Details

    • PigZapEvent

      @Internal public PigZapEvent(@NotNull @NotNull Pig pig, @NotNull @NotNull LightningStrike bolt, @NotNull @NotNull PigZombie zombifiedPiglin)
      Deprecated.
  • Method Details

    • getEntity

      @NotNull public @NotNull Pig getEntity()
      Deprecated.
      Description copied from class: EntityEvent
      Returns the Entity involved in this event
      Overrides:
      getEntity in class EntityEvent
      Returns:
      Entity who is involved in this event
      Since:
      1.1.0
    • getLightning

      @NotNull @Deprecated(since="26.2") public @NotNull LightningStrike getLightning()
      Deprecated.
      Gets the bolt which is striking the pig.
      Returns:
      lightning entity
      Since:
      1.0.0
    • getPigZombie

      @NotNull @Deprecated(since="1.13.2") public @NotNull PigZombie getPigZombie()
      Gets the zombified piglin that will replace the pig, provided the event is not cancelled first.
      Returns:
      resulting entity
      Since:
      1.0.0
    • isCancelled

      public boolean isCancelled()
      Deprecated.
      Description copied from interface: Cancellable
      Gets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins
      Specified by:
      isCancelled in interface Cancellable
      Overrides:
      isCancelled in class EntityZapEvent
      Returns:
      true if this event is cancelled
      Since:
      1.0.0
    • setCancelled

      public void setCancelled(boolean cancel)
      Deprecated.
      Description copied from interface: Cancellable
      Sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.
      Specified by:
      setCancelled in interface Cancellable
      Overrides:
      setCancelled in class EntityZapEvent
      Parameters:
      cancel - true if you wish to cancel this event
      Since:
      1.0.0