For over a decade, the narrative was simple: if you wanted to code complex custom features, you played Java Edition. If you wanted cross-play, you played Bedrock. But as we settle into 2026, that divide has shattered. The Minecraft Bedrock Scripting API has matured from a clumsy experimental feature into a robust, event-driven powerhouse that rivals the flexibility of Spigot or Paper.
If you are looking to start a Minecraft server on Bedrock today, you are no longer limited to simple behavior packs or command blocks. With the @minecraft/server module now stable and version 26.0 introducing deep integration with external web services, Bedrock developers can finally build the kind of intricate MMORPG systems that were once exclusive to Java.
This guide is for server owners and developers ready to move beyond “Add-ons” and start writing actual code. We will cover the architecture of the 2026 API, how to set up your environment, and how to deploy your scripts to a public Minecraft server.
The New Standard: TypeScript & The Module System
Gone are the days of hacking together JSON files. The modern Bedrock API is built on JavaScript (specifically TypeScript), running directly on the server’s engine. This isn’t a “mod” that players have to install; it is server-side logic that dictates how the world behaves.
To build the best Minecraft servers on Bedrock, you need to understand the three core modules provided by Mojang:
@minecraft/server: The core brain. It handles entity spawning, block manipulation, dimension management, and event listening (e.g.,world.afterEvents.playerJoin).@minecraft/server-ui: The interface builder. This allows you to create server-sided forms (menus) that look like native game UI, replacing the old “chest inventory” menus.@minecraft/server-net: The connector. This module allows your server to send HTTP requests to external APIs, enabling cross-server chat, leaderboards, and SQL database integration.
Step 1: Setting Up Your Development Environment
Before writing a single line of code, you need a proper workspace. Writing scripts in Notepad is a recipe for disaster.
Required Tools
- Visual Studio Code: The industry standard editor.
- Node.js (LTS Version): Required for package management (NPM).
- Debugger for Minecraft Bedrock: A VS Code extension that lets you set breakpoints and inspect variables while the server is running.
The Manifest File
Every script starts with a manifest.json. In 2026, with the new year-based versioning, your dependency section should look like this:
JSON
{
"format_version": 2,
"header": {
"name": "MyServerCore",
"description": "Core logic for the server",
"uuid": "your-uuid-here",
"version": [1, 0, 0],
"min_engine_version": [1, 26, 0]
},
"modules": [
{
"type": "script",
"language": "javascript",
"uuid": "another-uuid-here",
"entry": "scripts/main.js",
"version": [1, 0, 0]
}
],
"dependencies": [
{
"module_name": "@minecraft/server",
"version": "1.14.0"
},
{
"module_name": "@minecraft/server-ui",
"version": "1.3.0"
}
]
}
Expert Tip: Always use the
min_engine_versionthat matches your target Minecraft server hosting environment. If your host is running1.25.50, your script will fail to load if you require1.26.0.
Step 2: Your First Script (The “Welcome” UI)
Let’s build something practical. On a low lag Minecraft server, you don’t want to spam the chat with rules. Instead, we will use the server-ui module to pop up a clean window when a player joins.
Create a file named scripts/main.ts:
TypeScript
import { world, system } from "@minecraft/server";
import { ActionFormData } from "@minecraft/server-ui";
// Listen for a player joining the world
world.afterEvents.playerSpawn.subscribe((event) => {
const player = event.player;
// Only show to players, not simulated entities
if (!player.isValid()) return;
// Use system.run to ensure we are on the next tick
system.run(() => {
showWelcomeMenu(player);
});
});
function showWelcomeMenu(player) {
const form = new ActionFormData()
.title("Welcome to Bedrock 2026")
.body("Choose your starting kit to begin your adventure!")
.button("Warrior Kit", "textures/items/sword_diamond")
.button("Archer Kit", "textures/items/bow_pulling_0")
.button("Miner Kit", "textures/items/iron_pickaxe");
form.show(player).then((response) => {
if (response.canceled) return;
switch (response.selection) {
case 0:
player.runCommand("give @s diamond_sword");
break;
case 1:
player.runCommand("give @s bow");
player.runCommand("give @s arrow 64");
break;
case 2:
player.runCommand("give @s iron_pickaxe");
break;
}
});
}
This script creates a native UI form. Unlike Java plugins which require inventory-GUI hacks, this renders a smooth, client-side window that feels professional.
Step 3: Connecting to the Outside World (server-net)
The biggest leap in Minecraft servers development for Bedrock is the HTTP module. Previously, Bedrock servers were isolated silos. Now, you can fetch data from the real world.
Example: Fetching Real-Time Crypto Prices for an Economy Server
TypeScript
import { HttpRequest, HttpHeader, HttpClient, HttpRequestMethod } from "@minecraft/server-net";
import { world } from "@minecraft/server";
async function getBitcoinPrice() {
const req = new HttpRequest("https://api.coindesk.com/v1/bpi/currentprice.json");
req.method = HttpRequestMethod.Get;
const response = await http.request(req);
const data = JSON.parse(response.body);
world.sendMessage(`Current BTC Price: ${data.bpi.USD.rate}`);
}
Note: The @minecraft/server-net module is restricted on Realms but fully functional on Dedicated Servers.
Performance: The “Watchdog” Trap
One common mistake when developers how to run a Minecraft server with scripts is ignoring the Watchdog. Bedrock has a strict performance limiter. If your script takes too long to execute (blocking the main thread), the server will kill it to prevent lag.
Best Practices for Optimization:
- Avoid While Loops: Never use
while(true). It will crash the server instantly. - Use
system.runJob: For heavy tasks (like scanning thousands of blocks), break the task into small chunks spread across multiple ticks using generators. - Event Filtering: Don’t listen to every
entityHitevent if you only care about players. Use event filters to reduce overhead.
Hosting Your Scripted Server
Developing locally is easy, but how do you publish this to the world?
Dedicated Bedrock Server (BDS) vs. Realms
If you want to run a professional network, you must use the Dedicated Bedrock Server software (BDS).
- Realms: severely restricts the
@minecraft/server-netmodule and limits the number of players. - BDS: Allows full access to the file system, experimental modules, and higher player caps.
When choosing Minecraft server hosting, ensure the provider gives you full FTP access to the behavior_packs folder. You cannot upload scripts via a simple “drag and drop” web panel unless it supports raw file management.
Comparison: Bedrock Scripting vs. Java Plugins
Is Bedrock finally better than Java? Not yet, but it is closer than ever.
| Feature | Java Plugins (Spigot/Paper) | Bedrock Scripting API |
| Language | Java / Kotlin | JavaScript / TypeScript |
| Execution | JVM (Separate from game loop) | Native (Tied to game loop) |
| UI Capabilities | Chest Menus / Chat text | Native Forms / Modal Windows |
| External APIs | Full Access (SQL, Redis, etc.) | Limited HTTP Access (JSON) |
| Learning Curve | High (Requires compiling) | Low (Instant reload) |
For a public Minecraft server targeting console players, the Scripting API is the only way to provide a custom experience without forcing players to join via complex proxy hacks like Geyser.
FAQ: Scripting for Bedrock
Can I use NPM packages in my Bedrock script?
Not directly. The Bedrock engine does not run Node.js. You must use a bundler like esbuild or webpack to bundle your dependencies into a single JavaScript file that the game can read.
Do players need to download anything?
Yes. Scripts are part of a Behavior Pack. When a player joins your server, they will be prompted to download the pack. This is automatic, but keep your file sizes small to ensure quick join times.
Is the API stable in 2026?
Yes. The @minecraft/server module is versioned. If you write a script for version 1.12.0, it will continue to work on future versions of Minecraft, as the game ships with backwards compatibility for older script versions.
Can I edit the player’s inventory?
Absolutely. The InventoryComponent allows you to add, remove, clear, or enchant items directly. You can even access ender chests.
Conclusion: The Future is Typed
The 2026 Bedrock Scripting API represents a massive shift in how we think about Minecraft server plugins. We are no longer “tricking” the game into doing what we want; we are programming the engine itself.
For the aspiring administrator looking to start a Minecraft server, learning TypeScript is now the highest-ROI skill you can acquire. It allows you to build unique mechanics—from custom magic spells to complex stock markets—that run natively on your players’ iPads, Xboxes, and PCs.
The tools are ready. The documentation is mature. The only limit left is your code.
What to Read Next:

Leave a Reply