Package org.bukkit.event.entity
Class PigZapEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.entity.EntityEvent
org.bukkit.event.entity.EntityTransformEvent
com.destroystokyo.paper.event.entity.EntityZapEvent
org.bukkit.event.entity.PigZapEvent
- All Implemented Interfaces:
- Cancellable
Stores data for pigs being zapped
- 
Nested Class SummaryNested classes/interfaces inherited from class org.bukkit.event.entity.EntityTransformEventEntityTransformEvent.TransformReasonNested classes/interfaces inherited from class org.bukkit.event.EventEvent.Result
- 
Field SummaryFields inherited from class org.bukkit.event.entity.EntityEvententity
- 
Constructor SummaryConstructorsConstructorDescriptionPigZapEvent(@NotNull Pig pig, @NotNull LightningStrike bolt, @NotNull PigZombie pigzombie) 
- 
Method SummaryModifier and TypeMethodDescriptionReturns the Entity involved in this eventGets the bolt which is striking the pig.Deprecated.booleanGets the cancellation state of this event.voidsetCancelled(boolean cancel) Sets the cancellation state of this event.Methods inherited from class com.destroystokyo.paper.event.entity.EntityZapEventgetBolt, getHandlerList, getHandlers, getReplacementEntityMethods inherited from class org.bukkit.event.entity.EntityTransformEventgetTransformedEntities, getTransformedEntity, getTransformReasonMethods inherited from class org.bukkit.event.entity.EntityEventgetEntityTypeMethods inherited from class org.bukkit.event.EventcallEvent, getEventName, isAsynchronous
- 
Constructor Details- 
PigZapEvent
 
- 
- 
Method Details- 
isCancelledpublic boolean isCancelled()Description copied from interface:CancellableGets 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:
- isCancelledin interface- Cancellable
- Overrides:
- isCancelledin class- EntityZapEvent
- Returns:
- true if this event is cancelled
 
- 
setCancelledpublic void setCancelled(boolean cancel) Description copied from interface:CancellableSets 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:
- setCancelledin interface- Cancellable
- Overrides:
- setCancelledin class- EntityZapEvent
- Parameters:
- cancel- true if you wish to cancel this event
 
- 
getEntityDescription copied from class:EntityEventReturns the Entity involved in this event- Overrides:
- getEntityin class- EntityEvent
- Returns:
- Entity who is involved in this event
 
- 
getLightningGets the bolt which is striking the pig.- Returns:
- lightning entity
 
- 
getPigZombieDeprecated.Gets the zombie pig that will replace the pig, provided the event is not cancelled first.- Returns:
- resulting entity
 
 
- 
EntityTransformEvent.getTransformedEntity()