How to Use Game Rules in Minecraft

Managing your Server

·

Sep 11, 2024

·

9 Mins Read

Game rules allow you to alter or modify the gameplay of your Minecraft server without using any mods or plugins. Game rules are an extended set of configuration options available by default and can be used both in single player and multiplayer/servers.

Some examples of functions you can change with game rules include freezing the weather or time cycles, mobs dropping items when they die, players keeping the items in their inventory when they die, preventing creepers and endermen from griefing, and more.

Operator Permissions

You must be a server operator (OP) to be able to use the /gamerule command. If you are not yet an operator, check ot our tutorial here: Giving Operator (OP) to a Player

Using the command /gamerule will display a list of game rules you can modify.

Check out some of the useful game rules listed below, what they do, and the commands to enable or disable them. For a full list of all available Java Minecraft game rules, check out the wiki page on the subject here.

Game RuleDescriptionCommand
announceAdvancementsEnable or disable announcement of player achievements in-game./gamerule announceAdvancements <true or false>
doDaylightCycleEnable or disable the day and night cycle, and moon phases./gamerule doDaylightCycle <true or false>
doMobSpawningEnable or disable spawning of mobs in the worlds./gamerule doMobSpawning <true or false>
doWeatherCycleEnable or disable the weather cycle and changes in Minecraft./gamerule doWeatherCycle <true or false>
keepInventoryEnable or disable keeping of items in players' inventories when they die./gamerule keepInventory <true or false>
mobGriefingEnable or disable ability of mobs to change the world and pick items up./gamerule mobGriefing <true or false>
pvpEnable or disable ability of players to fight against or hit other players./gamerule pvp <true or false>
showDeathMessagesEnable or disable death messages from being show on the chat. This also affects messages shown to a player when their pet dies./gamerule showDeathMessages <true or false>
tntexplodesEnable or disable TNT explosions./gamerule tntexplodes <true or false>
minecraft pfp
Jay Miller

Game Experience Engineer @ Shockbyte