The GameRules class in @minecraft/server.
Class in @minecraft/server
import { GameRules } from '@minecraft/server';Constructor
Section titled “Constructor”protected constructor();Properties
Section titled “Properties”commandBlockOutput
Section titled “commandBlockOutput”commandBlockOutput: boolean;commandBlocksEnabled
Section titled “commandBlocksEnabled”commandBlocksEnabled: boolean;doDayLightCycle
Section titled “doDayLightCycle”doDayLightCycle: boolean;doEntityDrops
Section titled “doEntityDrops”doEntityDrops: boolean;doFireTick
Section titled “doFireTick”doFireTick: boolean;doImmediateRespawn
Section titled “doImmediateRespawn”doImmediateRespawn: boolean;doInsomnia
Section titled “doInsomnia”doInsomnia: boolean;doLimitedCrafting
Section titled “doLimitedCrafting”doLimitedCrafting: boolean;doMobLoot
Section titled “doMobLoot”doMobLoot: boolean;doMobSpawning
Section titled “doMobSpawning”doMobSpawning: boolean;doTileDrops
Section titled “doTileDrops”doTileDrops: boolean;doWeatherCycle
Section titled “doWeatherCycle”doWeatherCycle: boolean;drowningDamage
Section titled “drowningDamage”drowningDamage: boolean;fallDamage
Section titled “fallDamage”fallDamage: boolean;fireDamage
Section titled “fireDamage”fireDamage: boolean;freezeDamage
Section titled “freezeDamage”freezeDamage: boolean;functionCommandLimit
Section titled “functionCommandLimit”functionCommandLimit: number;keepInventory
Section titled “keepInventory”keepInventory: boolean;maxCommandChainLength
Section titled “maxCommandChainLength”maxCommandChainLength: number;mobGriefing
Section titled “mobGriefing”mobGriefing: boolean;naturalRegeneration
Section titled “naturalRegeneration”naturalRegeneration: boolean;playersSleepingPercentage
Section titled “playersSleepingPercentage”playersSleepingPercentage: number;projectilesCanBreakBlocks
Section titled “projectilesCanBreakBlocks”projectilesCanBreakBlocks: boolean;pvp: boolean;randomTickSpeed
Section titled “randomTickSpeed”randomTickSpeed: number;recipesUnlock
Section titled “recipesUnlock”recipesUnlock: boolean;respawnBlocksExplode
Section titled “respawnBlocksExplode”respawnBlocksExplode: boolean;sendCommandFeedback
Section titled “sendCommandFeedback”sendCommandFeedback: boolean;showBorderEffect
Section titled “showBorderEffect”showBorderEffect: boolean;showCoordinates
Section titled “showCoordinates”showCoordinates: boolean;showDaysPlayed
Section titled “showDaysPlayed”showDaysPlayed: boolean;showDeathMessages
Section titled “showDeathMessages”showDeathMessages: boolean;showRecipeMessages
Section titled “showRecipeMessages”showRecipeMessages: boolean;showTags
Section titled “showTags”showTags: boolean;spawnRadius
Section titled “spawnRadius”spawnRadius: number;tntExplodes
Section titled “tntExplodes”tntExplodes: boolean;tntExplosionDropDecay
Section titled “tntExplosionDropDecay”tntExplosionDropDecay: boolean;