Landing page for Minecraft Bedrock Script API Reference, containing documentation related to experimental and stable Minecraft Script APIs to interact with a Minecraft world programmatically.
The libraries of Script APIs are grouped under the @minecraft
scope on Minecraft and npm.
Visit one of the following links to view the full documentation that matches your Minecraft version.
Minecraft: Bedrock Edition API references: Script API - Latest
Minecraft: Bedrock Edition Preview API references: Script API - Preview
The main script module for Script API is @minecraft/server
. Core library features:
The @minecraft/server-ui
module helps you build simple form or dialogs to players.
Action Forms - A form with a list of buttons with captions and images for presenting a set of options to a player.
Message Forms - A form with two-button that are functional for Yes/No or OK/Cancel questions.
Modal Forms - A more flexible "questionnaire-style" list of controls in a form that can be used to take input.
One of the sample GameTests from Microsoft sample GameTest repository on GitHub
GameTest Framework is a toolset available to creators to build and test any new content using the @minecraft/server-gametest
script module and the /gametest
command in Minecraft. Each GameTest is broken into the following:
Use the Script API to send HTTP requests to the internet using the @minecraft/server-net
module.
Bedrock Editor in Minecraft Preview v1.21.30 (August 2024)
The Minecraft Editor or the @minecraft/server-editor
module is a built-in JavaScript library for building complex tools based on components provided by the Minecraft Editor API, created on top of Ore UI.
The Minecraft Editor module is heavily used on an Editor Extension, a set of resource pack and behavior packs (like .mcaddon
files but for editor) loaded into Editor at start up time.
Keep in mind this API can only be used with Minecraft: Bedrock Editor engine loaded, which is only accessible in Bedrock Preview on Windows.
Load configuration of variables and secrets in Bedrock Dedicated Server folder using Script API.
A Script API module that is used for debugging purposes. Currently features: