Skip to main content
MC COMMANDS logoMC COMMANDS
COMMAND BUILDER

Minecraft /gamerule Generator.

Sets or queries global gamerules. Adjust settings below to instantly generate the correct syntax.

LIVE TERMINAL OUTPUT

Generated Minecraft Syntax

Copy and paste this output directly into your Minecraft game console (press T) or command blocks.

/give @s diamond 64

What this command does?

Sets world rule **keepInventory** to **true**.
Documentation & Guide

About the /gamerule Generator

The /gamerule generator toggles world rules such as keepInventory, daylight cycle, mob griefing, fire spread, and tick speeds for survival, building, or mini-game maps.

How to Use This Generator

  1. Select the gamerule from the dropdown menu (e.g. keepInventory, doDaylightCycle).
  2. Set the desired value: true, false, or integer (for randomTickSpeed).
  3. Copy and execute in chat with cheats enabled.

Parameters & Options Explained

Rule Name

Case-sensitive gamerule string (e.g. keepInventory, doMobSpawning).

Value

Boolean true/false toggle or integer number.

Practical In-Game Example

Tested & Validated
/gamerule keepInventory true

Prevents players from losing items upon death in the world.

Java vs Bedrock Compatibility

Java Edition:Includes Java-specific rules like playersSleepingPercentage and maxCommandChainLength.
Bedrock Edition:Includes Bedrock-specific rules like showCoordinates and commandBlocksEnabled.

Important Limitations & Rules

  • Gamerule names are strictly case-sensitive.
  • Requires operator permissions or cheats enabled.
Advertisement