This guide will go over a few commonly used and potentially useful Gamerules, and what they do inside of your game. Gamerules are settings that can be changed to your liking through either the server panel's console or in game through chat using the /gamerule command. To use these in game, you'll need to OP yourself using this guide for Java or this guide for Bedrock.
keepInventory
keepInventory is a popular gamerule for those who do not want to go find their items after an unfortunate demise. As the name implies, keepInventory makes it to where you do not drop your items upon death, and instead, your items all come back to you upon respawning. keepInventory only has two inputs: true or false. The syntax is below:
/gamerule keepInventory <true|false>
Note: Do not include the <>s whenever doing the commands. Also, for inputting gamerules into the server panel console, do not include the /
mobGriefing
Don't want Creepers giving your home a surprise remodel? Disabling mobGriefing might be best for you! The mobGriefing gamerule determines whether or not mobs can destroy blocks, can trample your farms, and more. Like keepInventory, there's only two inputs that work with this rule, true or false. The syntax is below:
/gamerule mobGriefing <true|false>
doDaylightCycle
doDaylightCycle determines whether or not the Day/Night cycle can run on your server. This option is great to disable for creative building worlds, or for any other time you don't want a day or night to end. You can still change the time using the /time set command. The syntax is as follows:
/gamerule doDaylightCycle <true|false>
doInsomnia
Tired of Phantoms? doInsomnia determines whether or not Phantoms will spawn in your game. This is particularly useful for those who like exploring and may not have a bed on them for a long time. The syntax is below:
/gamerule doInsomnia <true|false>
doWeatherCycle
Not a fan of the weather in game? You can always disable it using doWeatherCycle! This option determines whether or not the game will go through its various weather cycles, and will freeze it in its current state. You can still change the weather manually using /weather commands. The syntax is below:
/gamerule doWeatherCycle <true|false>
doFireTick
Don't want your creations to be turned to ash by a stray spark? doFireTick is a great rule to prevent (or encourage) this. This rule determines whether or not fire will naturally spread or extinguish, making it a useful rule to disable if you want to make fireplaces or other decorative pieces without the fear of its surroundings burning. The syntax for this rule is below:
/gamerule doFireTick <true|false>
fireDamage
We know how to protect your buildings, but what about yourself? The fireDamage rule is your friend for this. fireDamage determines whether or not you'll take fire damage if lit ablaze through any means. The syntax is below:
/gamerule fireDamage <true|false>
fallDamage
fallDamage, as the name suggest, determines whether or not you take fall damage whilst playing. The syntax is shown below:
/gamerule fallDamage <true|false>
commandBlocksEnabled
Need command blocks? commandBlocksEnabled will allow you to spawn and use command blocks within your world! The syntax is below:
/gamerule commandBlocksEnabled <true|false>
For command blocks that need to be updated/used frequently, it is recommended to set the commandBlockOutput gamerule to false using /gamerule commandBlockOutput false
tntExplodes
NOTE: This rule only works on Bedrock Servers
As the name suggests, this rule determines whether or not TNT placed in your world will explode or not after being activated. Useful to prevent greifing. The syntax is below:
/gamerule tntExplodes <true|false>
playersSleepingPercentage
Don't want everyone having to sleep to skip a night? You can customize the amount of players needing to sleep using this gamerule! Unlike previous gamerules, you'll need to enter a number value between 0 and 100 in order to change it. The syntax is below:
/gamerule playersSleepingPercentage <0-100>
maxEntityCramming
NOTE: This rule only works on Java Servers
maxEntityCramming determines how many entities can be within the same block before taking 6 hearts of damage per second. This can be a useful way of dealing with lag caused by a massive amount of mobs in a small area. This rule accepts any integer value. Setting this value to zero or below disables the rule.
/gamerule playersSleepingPercentage <#>
randomTickSpeed
randomTickSpeed determines how often block ticks occur, dictating how fast crops grow, leafs decay, and more. The higher the value, the faster the effects occur. Any value over 4096 causes crops to grow and leaves to decay instantly. Setting the value to zero or below disables the rule, causing crops, leaves, and other objects tied to block ticks forever frozen in time.
/gamerule randomTickSpeed <#>