Skip to content

Community Driven Scripts for Minecraft's Scripting

License

Notifications You must be signed in to change notification settings

Remember-M9/ScriptAPI

 
 

Repository files navigation

ScriptAPI Samples

This repository is filled with community driven script samples for Minecraft Bedrock Script API.

Script Samples

  • Community driven scripts that use Script API to do all kinds of crazy stuff in Minecraft.

    ⚠️ Some scripts might use API modules that are only enabled in specific environments, including:

    • @minecraft/server-net and @minecraft/server-admin: Modules that can only be used in Bedrock Dedicated Servers.
    • @minecraft/server-editor and @minecraft/server-editor-bindings: Modules that can only be used on Editor projects in Minecraft Editor.
  • Contains technical documentation of Script API features.

    🚫 Documentation are no longer being updated. Check out Bedrock Wiki and Microsoft Learn for up-to-date infomation.

Contributing

Please contribute to this repository if you can.

The repository features a Pull Request system that inspires heavily from DefinitelyTyped. This implementation serves to ensure the attribution of code ownership to the script authors who manages of their scripts.

To create a new script package, create a folder structure based on the following:

File Purpose
index.js or index.ts This is main file for the package.
tests.js or tests.ts This contains sample code which tests the typings. This code does not run, but it is type-checked.
tsconfig.json This allows you to run tsc within the package.
README.md Infomation for the package.

To add yourself as a script author:

Adding your name to the end of the line, as in // Author: Alice <url>, Bob <url>. Or if there are more people, it can be multiline

// Author: Alice <url>
//         Bob <url>
//         Steve <url>
//         John <url>

Each package is versioned via GitHub repository tags. In order to secure credentials for scripts, each main file requires basic credentials with the right format. For example, here are the first few lines of script example:

// Script example for ScriptAPI
// Author: Alice <https://github.com/alice>
//         Bob <https://github.com/bob>
//         Steve <https://steve.com/>
// Project: https://github.com/JaylyDev/ScriptAPI

Script Versioning

The script samples are intended to be used within the latest version of Minecraft or Minecraft Preview, using latest development version of Script API modules.

For submitting or updating script samples, you must upload scripts that works in the latest version of Script API modules in latest Minecraft Preview. For more infomation please visit here.

To access older versions of scripts, this repository uses GitHub's tags feature to allow users to access previous versions of repository for scripts that uses a specific Minecraft version.

github_tags

Script status

This repository uses TypeScript compiler to test script files by validing with declaration files of Script API modules, making sure they are up-to-date when using in the latest Minecraft versions.

success_checks

Most of the time the checks succeed, which means scripts inside should not have any syntax errors when using in stable version of Minecraft.

If the check failed, it's worth creating a bug report if a fix is not implemented, or a pull request if you may find a solution to a fix to the problem.

About

Community Driven Scripts for Minecraft's Scripting

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 61.4%
  • TypeScript 38.6%