💡 Easy Explain
The system object manages the timing and logic engine of your Bedrock script. It allows you to run code after a certain delay (like setTimeout), run code continuously (like setInterval), or catch errors before they crash the game. It’s basically the heartbeat of your addon.
🎮 Code Examples ​
Run code with delay
javascript
import { system, world } from "@minecraft/server";
world.sendMessage("This message appears first...");
// Delay for 100 ticks (about 5 seconds, since 1 sec = 20 ticks)
system.runTimeout(() => {
world.sendMessage("This message appears 5 seconds later!");
}, 100);@minecraft/server / system
Variable: system ​
constsystem:System
Defined in: @minecraft/server/index.d.ts:25631
Remarks ​
A class that provides system-level events and functions.