How to Disable TNT and Creeper Explosions in Minecraft

·

Managing your Server

·

Sep 11, 2024

·

26 Mins Read

Explosions can be very dangerous and can cause damages to your builds, the terrain, or player health.

Although it is possible, undoing the effects of explosions may be difficult. It is for this reason that options in game are available to control explosions in your server. You can also enable or disable specific kinds like TNT and creeper explosions. These are made possible using plugins and game rules.

Note

You must be a server operator (OP) to be able to use the /gamerule and /region commands. If you are not yet an operator, check out our tutorial here: How to get OP on a Minecraft Server

# Control Explosions Using Game Rules

Game rules are features available in vanilla Minecraft which allow you to modify gameplay without the use of mods or plugins. Below are the game rule commands to enable or disable different kinds of explosions:

CommandDescription
/gamerule tntexplodes <true or false>This command will only work in the Bedrock Edition of Minecraft. For Java Edition, refer to the “Control Explosions Using Plugin” section below.

If set to true, TNT explosions are enabled in your Minecraft worlds. This is the default value.

If set to false, TNT explosions are disabled in your Minecraft worlds.
/gamerule mobGriefing <true or false> If set to true, explosions caused by mobs will be enabled. This is the default value.

If set to false, explosions caused by mobs will be disabled.

This game rule will also affect the ability of mobs to make changes to the world or pick items up e.g. endermen

You can find more information on Game Rules in this article: How to Use Game Rules in Minecraft


# Control Explosions Using a Plugin (WorldGuard)

If you are running a server type that allows plugins like Spigot, and would like to have more control on the specific explosions you would like to control, you can use the plugin called WorldGuard to do this.

You need to have WorldGuard and WorldEdit plugins installed on your server to use this option.

You may refer to our knowledgebase tutorial on installing plugins to your server: How to Install Plugins on a Minecraft Server

If you already have these plugins installed, you may refer to the commands below to control explosions on your server:

Note

These commands will only affect the worlds where they are used in. You will need to teleport to the worlds in your server and enter the commands to change explosion settings for each world.

CommandDescription
/region flag __global__ tnt <allow or deny>If set to allow, TNT explosions will be enabled in your Minecraft world. This is the default value.

If set to deny, TNT explosions will be disabled.
/region flag __global__ creeper-explosion <allow or deny>If set to allow, explosions caused by creepers will be enabled. This is the default value.

If set to deny, explosions caused by creepers will be disabled.
/region flag __global__ other-explosion <allow or deny> If set to allow, other kinds of explosions will be enabled. This is the default value.

If set to deny, other kinds of explosions will be disabled.

That's it! You now know how to enable or disable explosions on your Minecraft server.

Zach's Avatar
Zach Lowery

Game Experience Engineer