PrivateconstructorReadonly BetalocaleThe 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.
ReadonlymaxThis 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");
}
}
ReadonlymemoryThis 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();
ReadonlyplatformThis property can't be read in early-execution mode.
Contains the device information for a client instance.