Cancellablepublic class CreeperPowerEvent extends EntityEvent implements Cancellable
If a Creeper Power event is cancelled, the Creeper will not be powered.
| Modifier and Type | Class | Description | 
|---|---|---|
static class  | 
CreeperPowerEvent.PowerCause | 
 An enum to specify the cause of the change in power 
 | 
Event.Resultentity| Constructor | Description | 
|---|---|
CreeperPowerEvent(Creeper creeper,
                 LightningStrike bolt,
                 CreeperPowerEvent.PowerCause cause) | 
|
CreeperPowerEvent(Creeper creeper,
                 CreeperPowerEvent.PowerCause cause) | 
| Modifier and Type | Method | Description | 
|---|---|---|
CreeperPowerEvent.PowerCause | 
getCause() | 
 Gets the cause of the creeper being (un)powered. 
 | 
Creeper | 
getEntity() | 
 Returns the Entity involved in this event 
 | 
static HandlerList | 
getHandlerList() | 
|
HandlerList | 
getHandlers() | 
|
LightningStrike | 
getLightning() | 
 Gets the lightning bolt which is striking the Creeper. 
 | 
boolean | 
isCancelled() | 
 Gets the cancellation state of this event. 
 | 
void | 
setCancelled(boolean cancel) | 
 Sets the cancellation state of this event. 
 | 
getEntityTypegetEventName, isAsynchronouspublic CreeperPowerEvent(@NotNull
                         Creeper creeper,
                         @NotNull
                         LightningStrike bolt,
                         @NotNull
                         CreeperPowerEvent.PowerCause cause)
public CreeperPowerEvent(@NotNull
                         Creeper creeper,
                         @NotNull
                         CreeperPowerEvent.PowerCause cause)
public boolean isCancelled()
CancellableisCancelled in interface Cancellablepublic void setCancelled(boolean cancel)
CancellablesetCancelled in interface Cancellablecancel - true if you wish to cancel this event@NotNull public Creeper getEntity()
EntityEventgetEntity in class EntityEvent@Nullable public LightningStrike getLightning()
@NotNull public CreeperPowerEvent.PowerCause getCause()
@NotNull public HandlerList getHandlers()
getHandlers in class Event@NotNull public static HandlerList getHandlerList()
Copyright © 2019. All rights reserved.