Understanding Minecraft Game Rules
Game rules are powerful configuration options that allow you to modify your Minecraft server's gameplay without using mods or plugins. These built-in settings can dramatically change how your server functions, from basic gameplay mechanics to advanced server features.
Prerequisites
Before you can modify game rules:
- You must have operator (OP) status on the server
- Access to the server console or in-game commands
- Basic understanding of Minecraft commands
Basic Game Rule Commands
To view all available game rules:
/gamerule
To check a specific game rule's current value:
/gamerule <ruleName>
To change a game rule:
/gamerule <ruleName> <value>
Essential Game Rules
Player Experience Rules
Keep Inventory
Controls whether players keep their items after death
/gamerule keepInventory <true|false>
true: Players keep all items when they diefalse: Items drop on death (default)
Announce Advancements
Manages achievement announcements
/gamerule announceAdvancements <true|false>
true: Shows player achievements in chatfalse: Silently awards achievements
Show Death Messages
Controls death notifications
/gamerule showDeathMessages <true|false>
true: Displays death messages in chatfalse: Silently handles player deaths
World Behavior Rules
Daylight Cycle
Controls day/night cycle
/gamerule doDaylightCycle <true|false>
true: Normal day/night cyclefalse: Freezes time at current position
Weather Cycle
Manages weather changes
/gamerule doWeatherCycle <true|false>
true: Normal weather changesfalse: Locks current weather
Mob Spawning
Controls creature spawning
/gamerule doMobSpawning <true|false>
true: Mobs spawn normallyfalse: Prevents new mob spawning
Protection Rules
Mob Griefing
Controls mob environment interaction
/gamerule mobGriefing <true|false>
true: Mobs can modify blocksfalse: Prevents mob block modification
PvP Combat
Manages player combat
/gamerule pvp <true|false>
true: Players can damage each otherfalse: Prevents player combat
On Minecraft 1.21.2 and later the pvp key was removed from server.properties, so this gamerule is the only way to toggle PvP. See How to Turn PvP On or Off on Your Minecraft Server for per-world setups and the older method.
TNT Explosions (Bedrock Edition only)
tntExplodes is a Bedrock gamerule. Java Edition does not have it, so a Java server answers "Unknown gamerule" if you try.
/gamerule tntExplodes <true|false>
true: TNT causes explosions (Bedrock only)false: disables TNT explosions (Bedrock only)
On Java there is no gamerule for this. Use a protection plugin such as WorldGuard on Paper or Spigot instead.
Advanced Usage Tips
Combining Game Rules
Combine multiple rules for specific gameplay experiences:
- Peaceful server: Disable PvP and mob griefing
- Creative building: Disable weather and daylight cycles
- Hardcore experience: Enable all damage-related rules
Performance Optimization
Three gamerules that genuinely cut server work:
/gamerule doMobSpawning falsestops all new mob spawns, the single biggest saving on a busy world/gamerule randomTickSpeed 1(default is 3) cuts block ticking for crop growth, leaf decay, and fire spread. It slows farms, so treat it as a trade/gamerule maxEntityCramming 8(default is 24) culls entities that pile into one block, which is the real lever on entity processing
Common Configurations
Beginner-Friendly Server
/gamerule keepInventory true
/gamerule mobGriefing false
/gamerule doWeatherCycle false
Building Server
/gamerule doDaylightCycle false
/gamerule doWeatherCycle false
/gamerule doMobSpawning false
PvP Server
/gamerule keepInventory false
/gamerule showDeathMessages true
/gamerule pvp true
Troubleshooting
Common issues and solutions:
- Command not working: Verify operator status
- Rules not saving: Check server permissions
- Changes not applying: Restart affected game systems
Need help configuring your server's game rules? Contact our support team for assistance.
