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

    Class ClientSystemInfo

    Contains the device information for a client instance.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    locale: string

    The locale selected by the client (e.g., en_US, fr_FR, ja_JP). Note that in most cases, server scripts should not use this property to manually localize text. Instead, use RawMessage with a translate field to send localization keys, allowing each client to resolve them in their own language automatically. Direct use of locale for localization is fragile and may produce unexpected results when players with different languages are on the same server.

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

    maxRenderDistance: number

    The max render distance for the device in chunks.

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

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

    // Show the maximum render distance every online player
    function displayMaxRenderDistance() {
    for (const player of world.getPlayers()) {
    player.sendMessage("Your maximum render distance: " + player.clientSystemInfo.maxRenderDistance + " chunks");
    }
    }
    memoryTier: MemoryTier

    Describes the memory of the device.

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

    import { MemoryTier, Player } from "@minecraft/server";

    /**
    Show player's device memory
    @param player
    /
    function showClientMemory(player: Player) {
    const tier = player.clientSystemInfo.memoryTier;

    // Actual value of each memory tier is subject to change.
    switch (tier) {
    case MemoryTier.SuperLow:
    player.sendMessage("Client Total Memory: Under 1.5 GB (Super Low)");
    break;

    case MemoryTier.Low:
    player.sendMessage("Client Total Memory: 1.5 - 2.0 GB (Low)");
    break;

    case MemoryTier.Mid:
    player.sendMessage("Client Total Memory: 2.0 - 4.0 GB (Mid)");
    break;

    case MemoryTier.High:
    player.sendMessage("Client Total Memory: 4.0 - 8.0 GB (High)");
    break;

    case MemoryTier.SuperHigh:
    player.sendMessage("Client Total Memory: Over 8.0 GB (Super High)");
    break;

    default:
    break;
    }

    player.sendMessage("(Value for memory tier is used for reference. They are subject to change.)");
    }
    import { MemoryTier, system, world } from "@minecraft/server";

    function showServerMemory() {
    const tier = system.serverSystemInfo.memoryTier;

    // Actual value of each memory tier is subject to change.
    switch (tier) {
    case MemoryTier.SuperLow:
    world.sendMessage("Server Total Memory: Under 1.5 GB (Super Low)");
    break;

    case MemoryTier.Low:
    world.sendMessage("Server Total Memory: 1.5 - 2.0 GB (Low)");
    break;

    case MemoryTier.Mid:
    world.sendMessage("Server Total Memory: 2.0 - 4.0 GB (Mid)");
    break;

    case MemoryTier.High:
    world.sendMessage("Server Total Memory: 4.0 - 8.0 GB (High)");
    break;

    case MemoryTier.SuperHigh:
    world.sendMessage("Server Total Memory: Over 8.0 GB (Super High)");
    break;

    default:
    break;
    }

    world.sendMessage("(Value for memory tier is used for reference. They are subject to change.)");
    }

    showServerMemory();
    platformType: PlatformType

    The platform type of the device.

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

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

    // Show platform type to every player
    function showPlatformType() {
    for (const player of world.getPlayers()) {
    player.sendMessage("You're playing Minecraft on a " + player.clientSystemInfo.platformType);
    }
    }