Element-0 / ElementZero

Run windows version of BDS in linux with Mod support
GNU General Public License v3.0
273 stars 51 forks source link

**Why the scripts dosn't work for me?** #133

Closed Charmantroll closed 3 years ago

Charmantroll commented 4 years ago

Help, the scripts folder did not appear to me so I created it in the root of the bds where I have the bedrock_server_mod.exe, but I think the scripts do not work, I have it activated in custom.yaml

Weissnix4711 commented 4 years ago

The scripts folder is not automatically created. You are correct to create it yourself.

The entry point is a file called index.js. It must exist in the scripts folder.

From this file, you can import other scripts. The scripting API supports ES Modules. Use the following:

import "./scriptName.js";
import "./anotherScript.js";
FateForWindows commented 4 years ago

in addition to the above, keep in mind that scripting is currently broken on 1.16.1 and above.

Weissnix4711 commented 4 years ago

in addition to the above, keep in mind that scripting is currently broken on 1.16.1 and above.

Use the tag 200626 and you'll be fine.

Charmantroll commented 4 years ago

i am in tag 200626 and it still doesn't work for me, I think I'm wrong, in the installation, the ElementZero should be in a separate folder in the root of the BDS and the dist combined with the root of the BDS? or must be mixed, is that the installation instructions are not very clear to me

Redbeanw44602 commented 4 years ago

They must be mixed or they will not work. Are you using the build in action? The latest build does not seem to take effect in the js engine in 1.16.1. Look at the log output by the server.

Weissnix4711 commented 3 years ago

Closing for now as I presume the original issue has been solved.