Skip to content

@minecraft/server


@minecraft/server / GameRule

Enumeration: GameRule ​

Defined in: @minecraft/server/index.d.ts:1678

Game rules. These values can also be controlled via the /gamerule command.

Enumeration Members ​

CommandBlockOutput ​

CommandBlockOutput: "commandBlockOutput"

Defined in: @minecraft/server/index.d.ts:1685

Remarks ​

Whether command blocks should notify admins when they perform commands.


CommandBlocksEnabled ​

CommandBlocksEnabled: "commandBlocksEnabled"

Defined in: @minecraft/server/index.d.ts:1691

Remarks ​

Controls whether command blocks can execute commands.


DoDayLightCycle ​

DoDayLightCycle: "doDayLightCycle"

Defined in: @minecraft/server/index.d.ts:1697

Remarks ​

Controls whether the day and night cycles progress.


DoEntityDrops ​

DoEntityDrops: "doEntityDrops"

Defined in: @minecraft/server/index.d.ts:1703

Remarks ​

Controls whether non-mob entities do drops. ie. Item Frame


DoFireTick ​

DoFireTick: "doFireTick"

Defined in: @minecraft/server/index.d.ts:1709

Remarks ​

Controls whether fire spreads.


DoImmediateRespawn ​

DoImmediateRespawn: "doImmediateRespawn"

Defined in: @minecraft/server/index.d.ts:1716

Remarks ​

Controls whether players immediately respawn or are shown the death screen.


DoInsomnia ​

DoInsomnia: "doInsomnia"

Defined in: @minecraft/server/index.d.ts:1723

Remarks ​

Controls whether players deal with the effects of not sleeping (such as Phantom spawning).


DoLimitedCrafting ​

DoLimitedCrafting: "doLimitedCrafting"

Defined in: @minecraft/server/index.d.ts:1731

Remarks ​

Determines whether players should be able to craft only those recipes that they've unlocked first - when dolimitedcrafting is set to true.


DoMobLoot ​

DoMobLoot: "doMobLoot"

Defined in: @minecraft/server/index.d.ts:1737

Remarks ​

Controls whether mobs drop loot.


DoMobSpawning ​

DoMobSpawning: "doMobSpawning"

Defined in: @minecraft/server/index.d.ts:1743

Remarks ​

Controls whether mobs spawn naturally in the world.


DoTileDrops ​

DoTileDrops: "doTileDrops"

Defined in: @minecraft/server/index.d.ts:1749

Remarks ​

Controls whether blocks drop items when destroyed.


DoWeatherCycle ​

DoWeatherCycle: "doWeatherCycle"

Defined in: @minecraft/server/index.d.ts:1755

Remarks ​

Controls whether the weather can change naturally.


DrowningDamage ​

DrowningDamage: "drowningDamage"

Defined in: @minecraft/server/index.d.ts:1761

Remarks ​

Controls whether entities take damage from drowning.


FallDamage ​

FallDamage: "fallDamage"

Defined in: @minecraft/server/index.d.ts:1767

Remarks ​

Controls whether entities take damage from falling.


FireDamage ​

FireDamage: "fireDamage"

Defined in: @minecraft/server/index.d.ts:1773

Remarks ​

Controls whether entities take damage from fire.


FreezeDamage ​

FreezeDamage: "freezeDamage"

Defined in: @minecraft/server/index.d.ts:1779

Remarks ​

Controls whether there is damage from freezing.


FunctionCommandLimit ​

FunctionCommandLimit: "functionCommandLimit"

Defined in: @minecraft/server/index.d.ts:1786

Remarks ​

The maximum number of commands that can be executed simultaneously by the /function command.


KeepInventory ​

KeepInventory: "keepInventory"

Defined in: @minecraft/server/index.d.ts:1793

Remarks ​

Controls whether players keep their inventories when they die.


MaxCommandChainLength ​

MaxCommandChainLength: "maxCommandChainLength"

Defined in: @minecraft/server/index.d.ts:1800

Remarks ​

The maximum number of chained commands that can execute per tick.


MobGriefing ​

MobGriefing: "mobGriefing"

Defined in: @minecraft/server/index.d.ts:1807

Remarks ​

Controls whether mob griefing can happen in the world. Example: A Creeper explosion destroying blocks.


NaturalRegeneration ​

NaturalRegeneration: "naturalRegeneration"

Defined in: @minecraft/server/index.d.ts:1813

Remarks ​

Controls whether players can regenerate health.


PlayersSleepingPercentage ​

PlayersSleepingPercentage: "playersSleepingPercentage"

Defined in: @minecraft/server/index.d.ts:1820

Remarks ​

The percentage of players required to be sleeping in order to advance to the next day.


ProjectilesCanBreakBlocks ​

ProjectilesCanBreakBlocks: "projectilesCanBreakBlocks"

Defined in: @minecraft/server/index.d.ts:1830

Remarks ​

Controls whether 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 apply.


Pvp ​

Pvp: "pvp"

Defined in: @minecraft/server/index.d.ts:1836

Remarks ​

Controls whether players can damage each other.


RandomTickSpeed ​

RandomTickSpeed: "randomTickSpeed"

Defined in: @minecraft/server/index.d.ts:1843

Remarks ​

Controls how frequently random ticks occur. A value of 0 or less will disable random ticks. The default value is 1.


RecipesUnlock ​

RecipesUnlock: "recipesUnlock"

Defined in: @minecraft/server/index.d.ts:1852

Remarks ​

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.)


RespawnBlocksExplode ​

RespawnBlocksExplode: "respawnBlocksExplode"

Defined in: @minecraft/server/index.d.ts:1859

Remarks ​

Controls whether respawn blocks (e.g. Bed, Respawn Anchor) explode in other dimensions.


SendCommandFeedback ​

SendCommandFeedback: "sendCommandFeedback"

Defined in: @minecraft/server/index.d.ts:1867

Remarks ​

Controls whether command output is displayed to players. Also controls whether Command Block output is stored by default.


ShowBorderEffect ​

ShowBorderEffect: "showBorderEffect"

Defined in: @minecraft/server/index.d.ts:1873

Remarks ​

Controls whether Border Block effects are shown.


ShowCoordinates ​

ShowCoordinates: "showCoordinates"

Defined in: @minecraft/server/index.d.ts:1879

Remarks ​

Controls whether player coordinates are displayed.


ShowDaysPlayed ​

ShowDaysPlayed: "showDaysPlayed"

Defined in: @minecraft/server/index.d.ts:1885

Remarks ​

Controls whether the days a player has played is displayed.


ShowDeathMessages ​

ShowDeathMessages: "showDeathMessages"

Defined in: @minecraft/server/index.d.ts:1891

Remarks ​

Controls whether death messages are displayed in chat.


ShowRecipeMessages ​

ShowRecipeMessages: "showRecipeMessages"

Defined in: @minecraft/server/index.d.ts:1899

Remarks ​

Controls whether standard player notifications for recipes will show. When set to false, 'player unlocked recipes' are no longer sent as player notifications.


ShowTags ​

ShowTags: "showTags"

Defined in: @minecraft/server/index.d.ts:1906

Remarks ​

Controls whether item tags are shown. E.g. 'Can Place On', 'Can Destroy', item lock icons, etc.


SpawnRadius ​

SpawnRadius: "spawnRadius"

Defined in: @minecraft/server/index.d.ts:1914

Remarks ​

The block radius from world spawn that a player is allowed to spawn in. Does not affect Adventure mode. The default value is 10 blocks.


TntExplodes ​

TntExplodes: "tntExplodes"

Defined in: @minecraft/server/index.d.ts:1920

Remarks ​

Affects whether TNT blocks can be lit.


TntExplosionDropDecay ​

TntExplosionDropDecay: "tntExplosionDropDecay"

Defined in: @minecraft/server/index.d.ts:1927

Remarks ​

Controls whether blocks randomly drop loot or all blocks drop loot when destroyed by an explosion. Defaults to false.