/gamerule
Command
Sets or queries a game rule value. See more in the Popular Commands documentation.
Permission Level | Game Directors |
---|---|
Requires Cheats? | No |
Usage
Check game rule
/gamerule
Check the current game rule.
Set game rule, Boolean
/gamerule <rule: BoolGameRule> [value: Boolean]
Set a gamerule using a Boolean
.
Set game rule, integer
/gamerule <rule: IntGameRule> [value: int]
Set a gamerule using an integer
.
Arguments
rule
: BoolGameRule Boolean game rule settingrule
: IntGameRule Integer game rule settingvalue
: Boolean Boolean valuevalue
: int Integer value
Enums
BoolGameRule
Must be true
or false
.
Values
commandblockoutput
controls whether the command examples send an output to chatdodaylightcycle
controls whether the day cycle movesdoentitydrops
controls whether entities do dropsdofiretick
controls whether fire spreads or notrecipesunlock
controls whether built-in (vanilla) recipes automatically unlock as the player progresses through the game (one alternative to this is to use the /recipe command based on custom gameplay logic.)dolimitedcrafting
Determines whether players should be able to craft only those recipes that they've unlocked first - when dolimitedcrafting is set to truedomobloot
controls whether mobs drop lootdomobspawning
controls whether mobs spawn into the gamedotiledrops
controls whether tiles dropdoweathercycle
controls whether the weather is enableddrowningdamage
controls whether entities take damage from drowningfalldamage
controls whether entities take damage from fallingfiredamage
controls whether entities take damage from firekeepinventory
controls whether players keep their inventory when they diemobgriefing
controls whether mob griefing can happen in the worldpvp
controls whether players can damage each othershowcoordinates
controls whether coordinates are displayedshowdaysplayed
naturalregeneration
controls whether players can regenerate healthtntexplodes
controls whether TNT can explodesendcommandfeedback
controls whether command feedback is displayeddoinsomnia
controls whether players deal with the effects of not sleeping (such as phantoms)commandblocksenabled
controls whether command blocks can work in the world or notdoimmediaterespawn
controls whether players immediately respawn or have to choose to do soshowdeathmessages
controls whether death notices are displayedshowtags
controls whether tags are shownfreezedamage
controls whether there is damage from freezing or notrespawnblocksexplode
controls whether respawn blocks explodeshowbordereffect
controls whether border effects are shownshowrecipemessages
Configures if standard player notifications for recipes will show. When set to false, "player unlocked recipes" are no longer sent as player notificationsprojectilescanbreakblocks
Defines if projectiles (entities with a projectile component, like Arrows, thrown Tridents or Fireworks) can destroy certain blocks that support this interaction (such as Chorus Fruit, Dripstone or Decorated Pots). Restrictions on which projectiles can destroy certain blocks applytntexplosiondropdecay
IntGameRule
An integer
to replace the following default values.
1
for the DEFAULT_RANDOMTICKSPEED
.
4096
for the MAX_RANDOMTICKSPEED
.
10000
for the MAX_FUNCTIONCOMMANDLIMIT
.
5
for the DEFAULT_PLAYER_SPAWN_RADIUS
.
0
for the MIN_PLAYER_SPAWN_RADIUS.
128
for the MAX_PLAYER_SPAWN_RADIUS.
Values
maxcommandchainlength
Max Command Chain Lengthrandomtickspeed
Random Tick Speedfunctioncommandlimit
Function Command Limitspawnradius
Spawn Radiusplayerssleepingpercentage
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for