Interface ExplosionEvent.Detonate
- All Superinterfaces:
AffectEntityEvent, Cancellable, Event, ExplosionEvent
- All Known Implementing Classes:
AbstractDetonateEvent
- Enclosing interface:
ExplosionEvent
An event that is fired as the explosion is going to start affecting
multiple blocks and entities. Note that none of the locations have
been affected yet as this is mainly an event when an explosion has
already calculated all the blocks and entities the explosion should
affect.
-
Nested Class Summary
Nested classes/interfaces inherited from interface ExplosionEvent
ExplosionEvent.Detonate, ExplosionEvent.Pre -
Method Summary
Modifier and TypeMethodDescriptionGets the list of calculated affected locations for blocks that will be removed due to the explosion.voidfilterAffectedLocations(Predicate<ServerLocation> predicate) Filters outServerLocation's fromaffectedLocations()to be affected by this event.world()Gets theworld.Methods inherited from interface AffectEntityEvent
entities, entitySnapshots, filterEntities, filterEntityLocationsMethods inherited from interface Cancellable
isCancelled, setCancelledMethods inherited from interface ExplosionEvent
explosion
-
Method Details
-
world
-
affectedLocations
List<ServerLocation> affectedLocations()Gets the list of calculated affected locations for blocks that will be removed due to the explosion. This list can only be modified usingfilterAffectedLocations(Predicate).- Returns:
- The list of blocks that will be affected by the explosion
-
filterAffectedLocations
Filters outServerLocation's fromaffectedLocations()to be affected by this event.Locations for which the predicate returns
falsewill be removed fromaffectedLocations().- Parameters:
predicate- The predicate to use for filtering
-