Script API - v1.26.10
    Preparing search index...

    Represents the game rules for a world experience.

    import { world } from "@minecraft/server";

    world.gameRules.doDayLightCycle = false;
    world.gameRules.doEntityDrops = false;
    world.gameRules.doFireTick = false;
    world.gameRules.doWeatherCycle = false;
    world.gameRules.doMobSpawning = false;
    world.gameRules.showCoordinates = true;
    world.gameRules.showDaysPlayed = true;
    world.gameRules.keepInventory = true;
    import { world } from "@minecraft/server";

    world.gameRules.drowningDamage = false;
    world.gameRules.fallDamage = false;
    world.gameRules.fireDamage = false;
    world.gameRules.freezeDamage = false;
    world.gameRules.pvp = false;
    export class GameRules {
    private constructor();
    commandBlockOutput: boolean;
    commandBlocksEnabled: boolean;
    doDayLightCycle: boolean;
    doEntityDrops: boolean;
    doFireTick: boolean;
    doImmediateRespawn: boolean;
    doInsomnia: boolean;
    doLimitedCrafting: boolean;
    doMobLoot: boolean;
    doMobSpawning: boolean;
    doTileDrops: boolean;
    doWeatherCycle: boolean;
    drowningDamage: boolean;
    fallDamage: boolean;
    fireDamage: boolean;
    freezeDamage: boolean;
    functionCommandLimit: number;
    keepInventory: boolean;
    locatorBar: boolean;
    maxCommandChainLength: number;
    mobGriefing: boolean;
    naturalRegeneration: boolean;
    playersSleepingPercentage: number;
    projectilesCanBreakBlocks: boolean;
    pvp: boolean;
    randomTickSpeed: number;
    recipesUnlock: boolean;
    respawnBlocksExplode: boolean;
    sendCommandFeedback: boolean;
    showBorderEffect: boolean;
    showCoordinates: boolean;
    showDaysPlayed: boolean;
    showDeathMessages: boolean;
    showRecipeMessages: boolean;
    showTags: boolean;
    spawnRadius: number;
    tntExplodes: boolean;
    tntExplosionDropDecay: boolean;
    }
    Index

    Constructors

    Properties

    commandBlockOutput: boolean

    This property can't be edited in restricted-execution mode.

    This property can't be read in early-execution mode.

    commandBlocksEnabled: boolean

    This property can't be edited in restricted-execution mode.

    This property can't be read in early-execution mode.

    doDayLightCycle: boolean

    This property can't be edited in restricted-execution mode.

    This property can't be read in early-execution mode.

    doEntityDrops: boolean

    This property can't be edited in restricted-execution mode.

    This property can't be read in early-execution mode.

    doFireTick: boolean

    This property can't be edited in restricted-execution mode.

    This property can't be read in early-execution mode.

    doImmediateRespawn: boolean

    This property can't be edited in restricted-execution mode.

    This property can't be read in early-execution mode.

    doInsomnia: boolean

    This property can't be edited in restricted-execution mode.

    This property can't be read in early-execution mode.

    doLimitedCrafting: boolean

    This property can't be edited in restricted-execution mode.

    This property can't be read in early-execution mode.

    doMobLoot: boolean

    This property can't be edited in restricted-execution mode.

    This property can't be read in early-execution mode.

    doMobSpawning: boolean

    This property can't be edited in restricted-execution mode.

    This property can't be read in early-execution mode.

    doTileDrops: boolean

    This property can't be edited in restricted-execution mode.

    This property can't be read in early-execution mode.

    doWeatherCycle: boolean

    This property can't be edited in restricted-execution mode.

    This property can't be read in early-execution mode.

    drowningDamage: boolean

    This property can't be edited in restricted-execution mode.

    This property can't be read in early-execution mode.

    fallDamage: boolean

    This property can't be edited in restricted-execution mode.

    This property can't be read in early-execution mode.

    fireDamage: boolean

    This property can't be edited in restricted-execution mode.

    This property can't be read in early-execution mode.

    freezeDamage: boolean

    This property can't be edited in restricted-execution mode.

    This property can't be read in early-execution mode.

    functionCommandLimit: number

    This property can't be edited in restricted-execution mode.

    This property can't be read in early-execution mode.

    keepInventory: boolean

    This property can't be edited in restricted-execution mode.

    This property can't be read in early-execution mode.

    locatorBar: boolean

    This property can't be edited in restricted-execution mode.

    This property can't be read in early-execution mode.

    maxCommandChainLength: number

    This property can't be edited in restricted-execution mode.

    This property can't be read in early-execution mode.

    mobGriefing: boolean

    This property can't be edited in restricted-execution mode.

    This property can't be read in early-execution mode.

    naturalRegeneration: boolean

    This property can't be edited in restricted-execution mode.

    This property can't be read in early-execution mode.

    playersSleepingPercentage: number

    This property can't be edited in restricted-execution mode.

    This property can't be read in early-execution mode.

    projectilesCanBreakBlocks: boolean

    This property can't be edited in restricted-execution mode.

    This property can't be read in early-execution mode.

    pvp: boolean

    This property can't be edited in restricted-execution mode.

    This property can't be read in early-execution mode.

    randomTickSpeed: number

    This property can't be edited in restricted-execution mode.

    This property can't be read in early-execution mode.

    recipesUnlock: boolean

    This property can't be edited in restricted-execution mode.

    This property can't be read in early-execution mode.

    respawnBlocksExplode: boolean

    This property can't be edited in restricted-execution mode.

    This property can't be read in early-execution mode.

    sendCommandFeedback: boolean

    This property can't be edited in restricted-execution mode.

    This property can't be read in early-execution mode.

    showBorderEffect: boolean

    This property can't be edited in restricted-execution mode.

    This property can't be read in early-execution mode.

    showCoordinates: boolean

    This property can't be edited in restricted-execution mode.

    This property can't be read in early-execution mode.

    showDaysPlayed: boolean

    This property can't be edited in restricted-execution mode.

    This property can't be read in early-execution mode.

    showDeathMessages: boolean

    This property can't be edited in restricted-execution mode.

    This property can't be read in early-execution mode.

    showRecipeMessages: boolean

    This property can't be edited in restricted-execution mode.

    This property can't be read in early-execution mode.

    showTags: boolean

    This property can't be edited in restricted-execution mode.

    This property can't be read in early-execution mode.

    spawnRadius: number

    This property can't be edited in restricted-execution mode.

    This property can't be read in early-execution mode.

    tntExplodes: boolean

    This property can't be edited in restricted-execution mode.

    This property can't be read in early-execution mode.

    tntExplosionDropDecay: boolean

    This property can't be edited in restricted-execution mode.

    This property can't be read in early-execution mode.