Interface ArenaExplosionEvent.BlockFilter

Enclosing class:
ArenaExplosionEvent

public static interface ArenaExplosionEvent.BlockFilter
Decides on whether a block shall be broken due to an explosion
  • Field Details

    • ALL

      Don't destroy any blocks.

      Toggled using the config explosion-canbreakblocks.

    • BEDS

      Don't destroy team's beds.

      Toggled using the config bed-destroyableby-tnt.

      Unless the config is set to false, beds in the range of explosions may still cause the team's elimination, even if its block is included as a filter.

    • BLACKLIST_MATERIAL

      static final ArenaExplosionEvent.BlockFilter BLACKLIST_MATERIAL
      Don't destroy blocks whose material is blacklisted in the config explosion-blocks-blacklist.

      Toggled depending on whether the config is empty.

    • NON_PLAYER_PLACED

      static final ArenaExplosionEvent.BlockFilter NON_PLAYER_PLACED
      Don't destroy blocks that are a part of the map.

      Toggled using the config explosion-canbreakblocks-breakby-player.

    • TRAPS

      static final ArenaExplosionEvent.BlockFilter TRAPS
      Don't destroy placed traps.

      Toggled using the config traps-resistant-to-explosions.

    • BLOCKED_RAY

      static final ArenaExplosionEvent.BlockFilter BLOCKED_RAY
      Don't destroy any blocks if there is a blast-proof material inbetween it and the explosion.

      Toggled using the config explosion-raycheck.

  • Method Details

    • isUnaffected

      boolean isUnaffected(ArenaExplosionEvent event, Block block)
      Gets called for every block, unless a prior filter had returned true.
      Parameters:
      event - The event of the explosion
      block - The block we want to check whether it shall break or not
      Returns:
      true if the block shall stay. false to turn it into air