Hello everyone, I want to have a simple code that will stop EVERY explosion from damaging any blocks. I'm not sure what event I would put this under and how to make it stop every explosion? Any ideas? I'm thinking of using the BlockBreakEvent event, however I can't get a "broke by" then see if its equal to an explosion to cancel the event? Any help would help, thanks!
Correct, merely skip-read it and thought this would fire for every block that is broken :3 Most explos are from entities though? Primed tnt is an entity, those pilar things are entities, creepers are entities... What block explodes itself?!
Well I don't want to set the even canceled. I just want the damage to not effect any blocks. How could I do this?
Use BlockExplodeEvent, this is fired when a block explodes and EntityExplodeEvent is fired when a Entity explodes (like creeper, tnt). So, use blockexplodeevent and get the blocklist and clear it!