コマンドリファレンス
Minecraft /gamerule Command
worldJava版統合版 (Bedrock)
ゲームルール(keepInventory、mobGriefing、doDaylightCycleなど)を設定・確認します。
バージョン対応
Java版:1.21.4 (1.13+)
統合版 (Bedrock):1.21.60
コマンド構文
両エディション
/gamerule <rule> [<value>]引数の解説
ruleGamerule String必須The name of the gamerule (e.g., keepInventory, doDaylightCycle). Case sensitive!
valueBoolean / IntegerThe setting to apply. Boolean rules take true/false, integer rules take numbers.
実用的な使用例
/gamerule keepInventory truePrevents players from losing their inventory items when they die.
/gamerule doDaylightCycle falseFreezes the daylight cycle at its current time.
/gamerule randomTickSpeed 100Speeds up block updates (e.g. crop growth, leaf decay) in Java (default is 3).
重要な注意事項
Be aware that some gamerules are exclusive. E.g. Bedrock has `commandBlocksEnabled` and `showCoordinates`, while Java has `playersSleepingPercentage` and `mobGriefing` behaves slightly differently.