Lua Integration
Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.
Shulkerscript supports writing Lua code directly in your scripts. This allows you to use Lua’s powerful features and libraries to extend the functionality of your scripts.
The Lua code is embedded in the Shulkerscript code using the lua
keyword. In the future, you will be able to pass arguments to the Lua code, but for now, you can only write Lua code without arguments.
Your Lua code should return a string value when used in combination with the run keyword. This string returned will be included in the output.
Syntax
Globals
The following globals are available in the Lua environment:
shu_location
: The relative filepath of the script being executed
After variables are introduced in Shulkerscript, it is planned to make them available in the Lua environment as well.