🎉 Summer sale! Use code SUMMER26 for 50% off!
MinecraftMinecraft·Server Administration

How to Use Gamerules in Minecraft

Learn how to change game settings with gamerules to customize your Minecraft server without using mods or plugins.

Noah
·
2 min read
·
April 14, 2025
·
Last updated: July 22, 2026
Table of Contents

How to Use Gamerules in Minecraft

Gamerules let you change the game's behavior on your Minecraft server without using mods or plugins. These settings can be used both in singleplayer and on multiplayer servers.

Note: You need to be a server operator (OP) to use the /gamerule command.

Using Gamerules

To see a list of available gamerules, type:

/gamerule

To change a specific rule, use:

/gamerule <rulename> <value>

Example:

/gamerule keepInventory true

Useful Gamerules

Here are some commonly used gamerules:

announceAdvancements Enables or disables the announcement of player advancements in chat.

/gamerule announceAdvancements <true|false>

doDaylightCycle Controls whether the day and night cycle should run.

/gamerule doDaylightCycle <true|false>

doMobSpawning Determines whether mobs spawn naturally.

/gamerule doMobSpawning <true|false>

doWeatherCycle Controls whether the weather should change automatically.

/gamerule doWeatherCycle <true|false>

keepInventory Keeps the player's inventory after death.

/gamerule keepInventory <true|false>

mobGriefing Allows or prevents mobs from changing the world (for example, creepers, endermen).

/gamerule mobGriefing <true|false>

pvp Enables or disables player-versus-player combat. (Bedrock Edition only)

/gamerule pvp <true|false>

showDeathMessages Shows or hides death messages in chat.

/gamerule showDeathMessages <true|false>

tntExplodes (Bedrock Edition only) Controls whether TNT can explode.

/gamerule tntExplodes <true|false>

Important Notes

  • Changes to gamerules take effect immediately and do not require a server restart.
  • Some gamerules can significantly affect the gameplay experience; use them thoughtfully.
  • For a complete list of all available gamerules, visit the official Minecraft Wiki.

Need help configuring gamerules on your server? Contact our support team for assistance.

Minecraft

Ready to play Minecraft?

Get your own server running in minutes.