ScriptCraft

ScriptCraft

14.6k Downloads

Does not work with GraalVM R21.2.0 - java type error

ediloren opened this issue ยท 3 comments

commented

Trying to use GraalVM leads to java type error (GraalVM cannot access java types by default, because of security considerations).

I patched ScriptCraft to work with GraalVM with the GraalJS JavaScript engine.

Tested under Win10, GraalVM R21.2.0, SpigotMC R1.17.1.

You may try it using the fork https://github.com/ediloren/ScriptCraft. Includes instructions in the updated 'ReadMe'.

commented

Thank you for the fix @ediloren ! works for me!

commented

This worked, but only if I used GraalVM 20.3 (and MC 1.16.5). There was also an error org.graalvm.polyglot.PolyglotException: TypeError: logger["log(java.util.logging.Level,java.lang.String)"] is not a function, but I was able to get the correct result for js 1+1

commented

The "howl" example at https://github.com/ediloren/ScriptCraft worked for me, but the up() function doesn't seem to be defined and blocks doesn't seem to be defined