Minecraft
Configuration
How to Disable TNT and Creeper explosions

How to Disable TNT and Creeper explosions

Disable Creeper explosions

In the console (or op in the game) enter the command

/gamerule mobGriefing false

This will also result in Villagers not being able to harvest. If you don't want this side effect, please use a plugin (Java version) or behaviour pack (Bedrock version). Some popular plugins options include Essentials, WorldGuard, and NoTNT.

Disable TNT explosions

In the console (or op in the game) enter the command

/gamerule tntexplodes false