Interface ExplosionEvent.Detonate
-
- All Superinterfaces:
AffectEntityEvent
,Cancellable
,Event
,ExplosionEvent
- All Known Implementing Classes:
AbstractDetonateEvent
- Enclosing interface:
- ExplosionEvent
public static interface ExplosionEvent.Detonate extends ExplosionEvent, AffectEntityEvent
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 org.spongepowered.api.event.world.ExplosionEvent
ExplosionEvent.Detonate, ExplosionEvent.Pre
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description List<ServerLocation>
affectedLocations()
Gets the list of calculated affected locations for blocks that will be removed due to the explosion.void
filterAffectedLocations(Predicate<ServerLocation> predicate)
Filters outServerLocation
's fromaffectedLocations()
to be affected by this event.ServerWorld
world()
Gets theworld
.-
Methods inherited from interface org.spongepowered.api.event.entity.AffectEntityEvent
entities, entitySnapshots, filterEntities, filterEntityLocations
-
Methods inherited from interface org.spongepowered.api.event.Cancellable
isCancelled, setCancelled
-
Methods inherited from interface org.spongepowered.api.event.world.ExplosionEvent
explosion
-
-
-
-
Method Detail
-
world
ServerWorld world()
Gets theworld
.- Returns:
- The 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
void filterAffectedLocations(Predicate<ServerLocation> predicate)
Filters outServerLocation
's fromaffectedLocations()
to be affected by this event.Locations for which the predicate returns
false
will be removed fromaffectedLocations()
.- Parameters:
predicate
- The predicate to use for filtering
-
-