Commands
World Gamerule
How to view and change gamerules of a specific world
Edit on GitHubWorld Gamerule
The gamerule command lets you view or change a gamerule of a specific world, without having to be in that world.
Usage: /world gamerule <world> <rule> [<value>]
Permission: worlds.command.gamerule
See the Permissions page for all command permissions.
| Argument | Description |
|---|---|
<world> | The world to view or change the gamerule in |
<rule> | The gamerule to view or change, e.g. keep_inventory |
<value> | The new value of the gamerule. If omitted, the current value is displayed instead of changed |
The value has to match the type of the gamerule:
boolean gamerules accept true or false, while numeric gamerules accept a whole number.
Only gamerules that are available on your server are suggested. Gamerules belonging to disabled experimental features are not listed.
Examples
View the current value of a gamerule:
/world gamerule worlds:survival keep_inventoryEnable keep inventory in a world:
/world gamerule worlds:survival keep_inventory trueDisable mob spawning in a world:
/world gamerule worlds:lobby spawn_mobs falseChange the random tick speed of a world:
/world gamerule worlds:farm random_tick_speed 10