How to Use Gamerules in Minecraft

2 min. readlast update: 05.26.2025

In this quick guide we'll show you how to use Minecraft gamerules in your SimpleGameHosting Server!

Step 1) Make Yourself Operator

We have an in-depth guide on how to op yourself here, but quickly, you can OP yourself in your panel like this: 

op username

You should see something like this in game if it worked:

Step 2) Use Your Gamerule In Game

I'll go over some of the most commonly used gamerules here in this guide, but this can apply to any gamerule now that you are a server operator!

If you'd like to know more about each of these commands, we have a full, in-depth guide here

keepInventory

keepInventory can be true or false, true meaning on death your inventory will be saved, while false means your items will drop on death.

Applicable commands are:

/gamerule keepInventory true

/gamerule keepInventory false

mobGriefing

mobGriefing can be true or false. True means creeper explosions will destroy blocks, while false means they will explode, but blocks won't be destroyed.

Applicable commands are:

/gamerule mobGriefing true

/gamerule mobGriefing false

doDaylightCycle

doDaylightCycle can be true or false, where true means the sun will set and rise, while false means it will stop at the time of day you use the command at.

Applicable commands are:

/gamerule doDaylightCycle true

/gamerule doDaylightCycle false

doInsomnia

doInsomnia can be true or false, true meaning phantoms will spawn and false means they won't.

Applicable commands are:

/gamerule doInsomnia true

/gamerule doInsomnia false

doWeatherCycle

doWeatherCycle can be true or false, true meaning the weather (such as rain, thunderstorms, or snow) will happen, and false means it won't.

Applicable commands are:

/gamerule doWeatherCycle true

/gamerule doWeatherCycle false

doFireTick

doFireTick can be true or falseTrue means any fire will spread if able. False means no fire will spread at all. 

Applicable commands are:

/gamerule doFireTick true

/gamerule doFireTick false

fireDamage

fireDamage can be True or False. True means you can take fire damage, False means you cannot.

Applicable commands are:

/gamerule fireDamage true

/gamerule fireDamage false

playersSleepingPercentage

playerSleepPercentage uses the number given as the % amount of players required to sleep. For example, 50 means only half of the players need to sleep (if there are an odd number of players, it rounds up). 0 (zero) means that only one player has to sleep, regardless of the player count.

Applicable commands are:

/gamerule playerSleepPercentage X

Where X is any number between 0 and 100.

randomTickSpeed

randomTickSpeed will change how often things grow, leaves decay, etc. The default in Minecraft is 3, and the maximum is 4096

Applicable commands are:

/gamerule randomTickSpeed X

Where X is any number between 0 and 4096.

Was this article helpful?