MinecraftHub.io
Explainer

What Minecraft game rules are and where each edition sets them

Game rules are per-world switches and numbers for Java and Bedrock. This page covers the common ones, where each edition changes them, and why they stay with the world.

Published Checked

Game rules are per-world options that change how a world behaves, such as whether players keep their inventory after dying. Java Edition and Bedrock Edition both have them. You change them with the /gamerule command or a world settings screen, and they stay with that world. Facts below were read on 5 November 2026.

What game rules are

The Minecraft Wiki defines game rules as "a set of customizable options for a specific in-game world." Each rule is either a boolean (true or false) or an integer. Microsoft Learn describes the /gamerule command as the way to adjust features of a world and turn them on and off. Run with no value, the command only reports the current setting.

The game rules players and server owners change most

Four commonly changed rules, with names and defaults from the Minecraft Wiki game rule list and Microsoft Learn's gamerule Command page, read 5 November 2026
RuleJava nameBedrock nameDefault and effect
Keep inventorykeep_inventorykeepinventoryDefault false. Players keep items and experience after death.
Daylight cycleadvance_time (from the wiki's command example)dodaylightcycleControls whether the day cycle moves. Default not listed in the pages read.
Mob griefingmob_griefingmobgriefingDefault true. Controls whether creepers, endermen, ghasts and other mobs can change blocks, and whether mobs can pick up items.
Sleeping percentageplayers_sleeping_percentageplayerssleepingpercentageDefault 100. Share of Overworld players who must sleep to skip the night.

The sleeping rule is an integer. The wiki says a value of 0 or less lets one player skip the night, and a value above 100 prevents skipping. Turning off mob griefing has side effects: piglins stop picking up gold ingots, though players can still barter with them, and villagers stop picking up food.

Where Java sets game rules

Java Edition has an "Edit Game Rules" menu on the Create World and World Options screens, with categories named Player, Mobs, Spawning, Drops, World updates, Chat and Miscellaneous. In a running world, /gamerule needs permission level 2, and rule names are case sensitive. The pages read do not describe a server config file entry for game rules, so for what that file does cover, see what the server properties file controls.

Where Bedrock sets game rules

Bedrock Edition lets about half of the rules be changed from the Create New World screen, the Edit World screen and the pause menu settings. The wiki says the rest can only be changed by command, or in the Bedrock Editor's Export interface. The command needs permission level 1, and typed rule names are case-insensitive.

For keep inventory on Bedrock, the wiki marks keepinventory and mobgriefing as cheats only, and playerssleepingpercentage as available without cheats. The wiki also notes that rules changeable without cheats keep achievements enabled. keepinventory is not one of those. Microsoft Learn's command page lists "Requires Cheats? No", which does not match the wiki's per-rule marking, so check the rule in your own world.

Game rules travel with the world

Rules belong to the world, not to the player or the device. Microsoft Learn says gamerules "will stay in place in your created worlds", and suggests scripts that set several rules at once so you need not retype commands for each new world. A world you back up or move should bring its rules along. The pages read do not spell out file locations, so that part is inference.

For a player who uses mods, packs or a server, the point is that a rule set in one world does not apply in another. Game rules sit beside settings such as difficulty levels and game modes, not instead of them.

What differs between Java and Bedrock

  • Names: Java uses snake_case such as keep_inventory, Bedrock uses one lowercase word such as keepinventory.
  • Java-exclusive rules in the wiki list include raids, universal_anger, max_entity_cramming and reduced_debug_info.
  • locator_bar is a boolean on Java. The Bedrock equivalent, playerwaypoints, takes everyone or off.
  • Custom dummy game rules were added to Java in 1.8 (14w29a) and stopped being accepted in 1.13 (17w45a). Bedrock's command no longer accepts them either, from a version the wiki marks unknown.

Bedrock dedicated server owners can start with what the Bedrock Dedicated Server is, since the pages read cover the command but not that server's files.

Sources

  1. 1.gamerule Command, Microsoft Learn (last updated 21 April 2026)
  2. 2.Game rule, Minecraft Wiki (read 5 November 2026)
  3. 3.Introduction to Gamerules, Microsoft Learn (25 July 2025)
  4. 4./gamerule, Minecraft Wiki (read 5 November 2026)