Interface MobExplodeEvent
- All Superinterfaces:
Cancellable, Event, MobEvent
Fired when a mob is about to explode, as a creeper does at the end of its fuse.
Cancelling it keeps the mob alive: a creeper shrinks back, and whatever lit it goes out.
- Since:
- 0.1.0
-
Method Summary
Modifier and TypeMethodDescriptionbooleanReturnstrueif the explosion breaks blocks.floatpower()Returns the power of the explosion.voidsetBreaksBlocks(boolean breaksBlocks) Lets the explosion break blocks, or keeps it from doing so.voidsetPower(float power) Changes the power of the explosion.Methods inherited from interface Cancellable
isCancelled, setCancelled
-
Method Details
-
power
float power()Returns the power of the explosion.:3for a creeper, twice that for a charged one- Returns:
- the power of the explosion
- Since:
- 0.1.0
-
setPower
void setPower(float power) Changes the power of the explosion.- Parameters:
power- the new power; at0or less the mob vanishes without hurting or breaking anything- Since:
- 0.1.0
-
breaksBlocks
boolean breaksBlocks()Returnstrueif the explosion breaks blocks., as it does when themob_griefinggame rule allows it- Returns:
trueif the explosion breaks blocks- Since:
- 0.1.0
-
setBreaksBlocks
void setBreaksBlocks(boolean breaksBlocks) Lets the explosion break blocks, or keeps it from doing so.- Parameters:
breaksBlocks-trueto let it- Since:
- 0.1.0
-