JaylyMC
Homepage
Discord
GitHub
Homepage
Discord
GitHub
  • Features

    • Custom Components
    • Dynamic Properties
    • Script Eval
    • Script Privileges
    • Secrets and Variables
  • Meta

    • CDN Links
    • Scripting V1 Docs
  • References

    • Latest Docs
    • Preview Docs

Script Eval

A capability registry to enable the use of eval() and Function() from string in Minecraft scripting.

Enable it in manifest.json if neccessary.

manifest.json

{
  "capabilities": ["script_eval"]
}

Usage

You can execute JavaScript code through the Function object or eval function.

new Function('console.log("Hello World")');
eval('console.log("Hello World")');

Check out the following links for more infomation:

  • Detailed usage of Function object
  • Detailed usage of eval function

Errors

Following errors are thrown if script_eval is not enabled:

  • 'eval is not supported' or ''eval' is not defined'
  • Function from string is not supported
Last Updated: 5/20/25, 4:55 PM
Prev
Dynamic Properties
Next
Script Privileges
Privacy Policy | © JaylyMC 2025