Class AbstractDetonateEvent
- java.lang.Object
-
- org.spongepowered.api.event.impl.AbstractEvent
-
- org.spongepowered.api.event.impl.entity.AbstractAffectEntityEvent
-
- org.spongepowered.api.event.impl.world.AbstractDetonateEvent
-
- All Implemented Interfaces:
Cancellable
,AffectEntityEvent
,Event
,ExplosionEvent
,ExplosionEvent.Detonate
public abstract class AbstractDetonateEvent extends AbstractAffectEntityEvent implements ExplosionEvent.Detonate
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.spongepowered.api.event.world.ExplosionEvent
ExplosionEvent.Detonate, ExplosionEvent.Pre
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.List<ServerLocation>
affectedLocations
-
Fields inherited from class org.spongepowered.api.event.impl.entity.AbstractAffectEntityEvent
entities, entitySnapshots
-
Fields inherited from class org.spongepowered.api.event.impl.AbstractEvent
currentOrder
-
-
Constructor Summary
Constructors Constructor Description AbstractDetonateEvent()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<ServerLocation>
affectedLocations()
Gets the list of calculated affected locations for blocks that will be removed due to the explosion.void
filterAffectedLocations(java.util.function.Predicate<ServerLocation> predicate)
Filters outServerLocation
's fromExplosionEvent.Detonate.affectedLocations()
to be affected by this event.-
Methods inherited from class org.spongepowered.api.event.impl.entity.AbstractAffectEntityEvent
entities, entitySnapshots, filterEntities
-
Methods inherited from class org.spongepowered.api.event.impl.AbstractEvent
init
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
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
-
Methods inherited from interface org.spongepowered.api.event.world.ExplosionEvent.Detonate
world
-
-
-
-
Field Detail
-
affectedLocations
protected java.util.List<ServerLocation> affectedLocations
-
-
Method Detail
-
affectedLocations
public java.util.List<ServerLocation> affectedLocations()
Description copied from interface:ExplosionEvent.Detonate
Gets the list of calculated affected locations for blocks that will be removed due to the explosion. This list can only be modified usingExplosionEvent.Detonate.filterAffectedLocations(Predicate)
.- Specified by:
affectedLocations
in interfaceExplosionEvent.Detonate
- Returns:
- The list of blocks that will be affected by the explosion
-
filterAffectedLocations
public void filterAffectedLocations(java.util.function.Predicate<ServerLocation> predicate)
Description copied from interface:ExplosionEvent.Detonate
Filters outServerLocation
's fromExplosionEvent.Detonate.affectedLocations()
to be affected by this event.Locations for which the predicate returns
false
will be removed fromExplosionEvent.Detonate.affectedLocations()
.- Specified by:
filterAffectedLocations
in interfaceExplosionEvent.Detonate
- Parameters:
predicate
- The predicate to use for filtering
-
-