Interface ExplosionEvent.Detonate

    • Method Detail

      • affectedLocations

        java.util.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 using filterAffectedLocations(Predicate).
        Returns:
        The list of blocks that will be affected by the explosion
      • filterAffectedLocations

        void filterAffectedLocations​(java.util.function.Predicate<ServerLocation> predicate)
        Filters out ServerLocation's from affectedLocations() to be affected by this event.

        Locations for which the predicate returns false will be removed from affectedLocations().

        Parameters:
        predicate - The predicate to use for filtering