Editing
MinecraftCommands
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== gamerule === {{/infobox |gamerule |op |1.4.2|12w32a }} Sets or queries a game rule value. ;Syntax : <code>gamerule <''rule name''> [''value'']</code> ;Arguments : ''rule name'' :: Specifies the game rule to set or query. May be ''any'' value, but only certain predefined game rules will affect gameplay (see ''Predefined Game Rules'' below). : ''value'' (optional) :: Specifies the value to set the game rule to. May be ''any'' value, though only <code>true</code> or <code>false</code> specified for predefined game rules will actually affect gameplay, except in the case of <code>randomTickSpeed</code> and <code>spawnRadius<code>, where any integer 0 or greater will affect gameplay (see ''Predefined Game Rules'' below). :{| class=wikitable |+ Predefined Game Rules ! Rule Name ! Description ! Default Value |- | <code>commandBlockOutput</code> | Whether [[command block]]s should notify admins when they perform commands | style="text-align:center" | <code>true</code> |- | <code>disableElytraMovementCheck</code> | Whether the server should skip checking player speed when the player is wearing [[elytra]]. | style="text-align:center" | <code>false</code> |- | <code>doDaylightCycle</code> | Whether the [[day-night cycle]] and [[moon]] phases progress | style="text-align:center" | <code>true</code> |- | <code>doEntityDrops<code> | Whether entities that are not mobs should have drops | style="text-align:center" | <code>true</code> |- | <code>doFireTick</code> | Whether fire should spread and naturally extinguish | style="text-align:center" | <code>true</code> |- | <code>doMobLoot</code> | Whether mobs should drop items | style="text-align:center" | <code>true</code> |- | <code>doMobSpawning</code> | Whether mobs should naturally spawn | style="text-align:center" | <code>true</code> |- | <code>doTileDrops</code> | Whether blocks should have drops | style="text-align:center" | <code>true</code> |- | <code>keepInventory</code> | Whether the player should keep items in their inventory after death | style="text-align:center" | <code>false</code> |- | <code>logAdminCommands</code> | Whether to log admin commands to server log | style="text-align:center" | <code>true</code> |- | <code>mobGriefing</code> | Whether [[creeper]]s, [[zombie]]s, [[endermen]], [[ghast]]s, [[wither]]s, [[ender dragon]]s, [[rabbit]]s, [[sheep]], and [[villager]]s should be able to change blocks and whether villagers, zombies, [[skeleton]]s, and [[zombie pigmen]] can pick up items | style="text-align:center" | <code>true</code> |- | <code>naturalRegeneration</code> | Whether the player can regenerate health naturally if their hunger is full enough (doesn't affect external healing, such as [[golden apple]]s, the [[Regeneration|Regeneration effect]], etc.) | style="text-align:center" | <code>true</code> |- | <code>randomTickSpeed</code> | How often a random [[block tick]] occurs (such as plant growth, leaf decay, etc.) per chunk section per game tick. 0 will disable random ticks, higher numbers will increase random ticks | style="text-align:center" | <code>3</code> |- | <code>reducedDebugInfo</code> | Whether the debug screen shows all or reduced information | style="text-align:center" | <code>false</code> |- | <code>sendCommandFeedback</code> | Whether the feedback from commands executed by a player should show up in chat. Also affects the default behavior of whether command blocks store their output text | style="text-align:center" | <code>true</code> |- | <code>showDeathMessages</code> | Whether a message appears in chat when a player dies | style="text-align:center" | <code>true</code> |- | <code>spawnRadius</code> | The number of blocks outward from the world spawn coordinates that a player will spawn in when first joining a server or when dying without a spawnpoint. | style="text-align:center" | <code>10</code> |- | <code>spectatorsGenerateChunks</code> | Whether players in [[spectator]] mode can generate chunks | style="text-align:center" | <code>true</code> |} ;Result : Fails if ''rule name'' is not defined and ''value'' is not provided (i.e., attempting to query an undefined game rule). : On success, returns the value of the game rule (if ''value'' is not provided) or sets the game rule to the specified value (if ''value'' is provided). : New game rules may be defined and set (by providing a value) or queried (by not providing a value). ;Examples : To stop the day-night cycle: <code>gamerule doDaylightCycle false</code> : To stop natural healing: <code>gamerule naturalRegeneration false</code> : To define a new game rule called <code>MyNewRule</code> and sets its value to 10: <code>gamerule MyNewRule 10</code> <!-- please retain double newline above for section differentiation -->
Summary:
Please note that all contributions to Hegemon Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Hegemon Wiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
Edit source
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information