public class CreeperPowerEvent extends EntityEvent implements Cancellable
If a Creeper Power event is cancelled, the Creeper will not be powered.
Modifier and Type | Class and Description |
---|---|
static class |
CreeperPowerEvent.PowerCause
An enum to specify the cause of the change in power
|
Event.Result
entity
Constructor and Description |
---|
CreeperPowerEvent(Creeper creeper,
CreeperPowerEvent.PowerCause cause) |
CreeperPowerEvent(Creeper creeper,
LightningStrike bolt,
CreeperPowerEvent.PowerCause cause) |
Modifier and Type | Method and 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.
|
getEntityType
getEventName, isAsynchronous
public CreeperPowerEvent(Creeper creeper, LightningStrike bolt, CreeperPowerEvent.PowerCause cause)
public CreeperPowerEvent(Creeper creeper, CreeperPowerEvent.PowerCause cause)
public boolean isCancelled()
Cancellable
isCancelled
in interface Cancellable
public void setCancelled(boolean cancel)
Cancellable
setCancelled
in interface Cancellable
cancel
- true if you wish to cancel this eventpublic Creeper getEntity()
EntityEvent
getEntity
in class EntityEvent
public LightningStrike getLightning()
public CreeperPowerEvent.PowerCause getCause()
public HandlerList getHandlers()
getHandlers
in class Event
public static HandlerList getHandlerList()
Copyright © 2017. All rights reserved.