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"]
}

Errors

Following errors are thrown if script_eval is not enabled:

  • Function from string is not supported

Example:

new Function('console.log("Hello World")');
  • 'eval is not supported' or ''eval' is not defined'

Example:

eval('console.log("Hello World")');
Last Updated:
Contributors: github-actions