Cancellable
PigZapEvent
public class EntityZapEvent extends EntityTransformEvent implements Cancellable
EntityTransformEvent.TransformReason
Event.Result
entity
Constructor | Description |
---|---|
EntityZapEvent(@NotNull Entity entity,
@NotNull LightningStrike bolt,
@NotNull Entity replacementEntity) |
Modifier and Type | Method | Description |
---|---|---|
@NotNull LightningStrike |
getBolt() |
Gets the lightning bolt that is striking the entity.
|
static @NotNull HandlerList |
getHandlerList() |
|
@NotNull HandlerList |
getHandlers() |
|
@NotNull Entity |
getReplacementEntity() |
Gets the entity that will replace the struck entity.
|
boolean |
isCancelled() |
Gets the cancellation state of this event.
|
void |
setCancelled(boolean cancel) |
Sets the cancellation state of this event.
|
getEntity, getEntityType
getTransformedEntities, getTransformedEntity, getTransformReason
callEvent, getEventName, isAsynchronous
public EntityZapEvent(@NotNull @NotNull Entity entity, @NotNull @NotNull LightningStrike bolt, @NotNull @NotNull Entity replacementEntity)
public boolean isCancelled()
Cancellable
isCancelled
in interface Cancellable
isCancelled
in class EntityTransformEvent
public void setCancelled(boolean cancel)
Cancellable
setCancelled
in interface Cancellable
setCancelled
in class EntityTransformEvent
cancel
- true if you wish to cancel this event@NotNull public @NotNull LightningStrike getBolt()
@NotNull public @NotNull Entity getReplacementEntity()
@NotNull public @NotNull HandlerList getHandlers()
getHandlers
in class EntityTransformEvent
@NotNull public static @NotNull HandlerList getHandlerList()
Copyright © 2020. All rights reserved.