Interface ArenaExplosionEvent.BlockFilter
- Enclosing class:
ArenaExplosionEvent
public static interface ArenaExplosionEvent.BlockFilter
Decides on whether a block shall be broken due to an explosion
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ArenaExplosionEvent.BlockFilterDon't destroy any blocks.static final ArenaExplosionEvent.BlockFilterDon't destroy team's beds.static final ArenaExplosionEvent.BlockFilterDon't destroy blocks whose material is blacklisted in the configexplosion-blocks-blacklist.static final ArenaExplosionEvent.BlockFilterDon't destroy any blocks if there is a blast-proof material inbetween it and the explosion.static final ArenaExplosionEvent.BlockFilterDon't destroy blocks that are a part of the map.static final ArenaExplosionEvent.BlockFilterDon't destroy placed traps. -
Method Summary
Modifier and TypeMethodDescriptionbooleanisUnaffected(ArenaExplosionEvent event, Block block) Gets called for every block, unless a prior filter had returnedtrue.
-
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
Don't destroy blocks whose material is blacklisted in the configexplosion-blocks-blacklist.Toggled depending on whether the config is empty.
-
NON_PLAYER_PLACED
Don't destroy blocks that are a part of the map.Toggled using the config
explosion-canbreakblocks-breakby-player. -
TRAPS
Don't destroy placed traps.Toggled using the config
traps-resistant-to-explosions. -
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
Gets called for every block, unless a prior filter had returnedtrue.- Parameters:
event- The event of the explosionblock- The block we want to check whether it shall break or not- Returns:
trueif the block shall stay.falseto turn it into air
-