Cancellable
public class EntityExplodeEvent extends EntityEvent implements Cancellable
Event.Result
entity
Constructor | Description |
---|---|
EntityExplodeEvent(@NotNull Entity what,
@NotNull Location location,
@NotNull List<Block> blocks,
float yield) |
Modifier and Type | Method | Description |
---|---|---|
@NotNull List<Block> |
blockList() |
Returns the list of blocks that would have been removed or were removed
from the explosion event.
|
static @NotNull HandlerList |
getHandlerList() |
|
@NotNull HandlerList |
getHandlers() |
|
@NotNull Location |
getLocation() |
Returns the location where the explosion happened.
|
float |
getYield() |
Returns the percentage of blocks to drop from this explosion
|
boolean |
isCancelled() |
Gets the cancellation state of this event.
|
void |
setCancelled(boolean cancel) |
Sets the cancellation state of this event.
|
void |
setYield(float yield) |
Sets the percentage of blocks to drop from this explosion
|
getEntity, getEntityType
getEventName, isAsynchronous
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 event@NotNull public @NotNull List<Block> blockList()
@NotNull public @NotNull Location getLocation()
It is not possible to get this value from the Entity as the Entity no longer exists in the world.
public float getYield()
public void setYield(float yield)
yield
- The new yield percentage@NotNull public @NotNull HandlerList getHandlers()
getHandlers
in class Event
@NotNull public static @NotNull HandlerList getHandlerList()
Copyright © 2020. All rights reserved.