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

    Script API - v1.26.20.22

    Minecraft Script API lets you easily interact with your Minecraft world using JavaScript in Add-Ons.

    Newer features are introduced in newer versions of Minecraft Bedrock and Minecraft Preview. You should choose a version of the reference documentation below that matches your Minecraft version.

    • Minecraft: Bedrock Edition API references: Script API - Latest

    • Minecraft: Bedrock Edition Preview API references: Script API - Preview

    • Other Minecraft Script API references: Homepage

    Script API contains multiple modules with separate releases, with each module provides specific functionalities.

    • @minecraft/server - A module which is essential for managing and interacting with a Minecraft world.

    • @minecraft/server-ui - A module for creating simple pop-up forms that allow users to provide you with formatted inputs through submissions.

    • @minecraft/server-gametest (docs) - A module for building your own tests in GameTest Framework.

    • @minecraft/server-editor (docs) - A module for interacting with the Minecraft Editor API, and building an Editor extension.

    • @minecraft/server-net (docs) - A module which allows for server-based HTTP request handling, and manages server packets handling within a Bedrock Dedicated Server.

    • @minecraft/server-admin (docs) - A module to manage the administration in a Bedrock Dedicated Server.

    • @minecraft/debug-utilities (docs) - An utility module that is used for debugging purposes.

    • @minecraft/diagnostics (docs) - A module allows script modules to connect their script packs to Sentry. This enables remote error tracking and monitoring for script packs.

    • @minecraft/server-graphics (docs) - A module that provides access to graphics and rendering settings on the server side for Vibrant Visuals.

    There are several script API modules in Bedrock Edition that are exclusive to certain platforms due to capability restrictions on different platforms. Here is a table of the features that are available only on certain platforms as of Minecraft v26.20.

    Modules Client / Single-player Bedrock Dedicated Server Realms
    @minecraft/common Yes Yes Yes
    @minecraft/debug-utilities Yes Yes (Note 3) No
    @minecraft/diagnostics No Yes (Note 3) No
    @minecraft/server Yes Yes Yes
    @minecraft/server-admin Yes Yes No (Note 4)
    @minecraft/server-editor Yes (Note 1) Yes (Note 2) Yes
    @minecraft/server-gametest Yes Yes Yes
    @minecraft/server-net No Yes (Note 3) No
    @minecraft/server-ui Yes Yes Yes
    @minecraft/server-graphics Yes Yes (Note 3) No

    Notes:

    1. Requires Bedrock Editor. The editor can be opened from the "Creator Tools" tab.
    2. Requires Bedrock Editor. Launch the bedrock_server.exe to enable editor with the command line, like this:
      bedrock_server.exe Editor=true
      
    3. Script module must be enabled manually in "permissions.json" file.
    4. @minecraft/server-admin module is disabled in Realms. Read more on why this was changed





    Information for Researchers, Scrapers, and LLMs

    This website is not affiliated with Mojang or Microsoft