public class CreeperPowerEvent extends Object implements EntityEvent, Cancellable
| Modifier and Type | Class and Description |
|---|---|
static class |
CreeperPowerEvent.PowerCause
An enum to specify the cause of the change in power
|
| Constructor and Description |
|---|
CreeperPowerEvent(Creeper creeper,
CreeperPowerEvent.PowerCause cause) |
CreeperPowerEvent(Creeper creeper,
Lightning bolt,
CreeperPowerEvent.PowerCause cause) |
| Modifier and Type | Method and Description |
|---|---|
CreeperPowerEvent.PowerCause |
getCause()
Gets the cause of the creeper being (un)powered.
|
Creeper |
getEntity() |
Lightning |
getLightning()
Gets the lightning bolt which is striking the Creeper.
|
boolean |
isCancelled()
Whether or not to cancel the event.
|
void |
setCancelled(boolean cancelled)
Decides whether to cancel the event.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcancelpublic CreeperPowerEvent(Creeper creeper, Lightning bolt, CreeperPowerEvent.PowerCause cause)
public CreeperPowerEvent(Creeper creeper, CreeperPowerEvent.PowerCause cause)
public Creeper getEntity()
getEntity in interface EntityEventpublic Lightning getLightning()
public CreeperPowerEvent.PowerCause getCause()
public boolean isCancelled()
CancellableisCancelled in interface Cancellablepublic void setCancelled(boolean cancelled)
CancellablesetCancelled in interface Cancellablecancelled - true to cancel the event.Copyright © 2017–2019 NukkitX. All rights reserved.