ScriptCraft

ScriptCraft

14.6k Downloads

ScriptCraft - Potential Compatibility Issue with Minecraft 1.15.2 + JRE

spacefluff432 opened this issue ยท 18 comments

commented

Java Version: 1.8.0_241
Client Version: Vanilla 1.15.1
Server Version: Paper 1.15.1 (build 62)
PaperMC/Paper@d4ae43f

Error Log:

21.01 21:10:10 [Server] INFO Enabling scriptcraft v3.4.0-2019-01-20*
21.01 21:10:10 [Server] ERROR No JavaScript Engine available. ScriptCraft will not work without Javascript.
21.01 21:10:10 [Server] Startup Done (19.548s)! For help, type "help"
commented

I first tried using ScriptCraft (3.4.0 jar) with Paper ("no javascript engine available"). Then I tried spigot but go the same error. I'm using java 17 and a recent build of MC. I tried jwulf's patch to call ScriptEngineManager with a null arg.

I'm trying to build my own scriptcraft.jar. I'm currently stuck on ant gen-events-helper-bukkit which logs Cannot invoke "javax.script.ScriptEngine.put(String, Object)" because "<local2>" is null

commented

I use Spigot 1.15.1 and that message doesn't appear for me.

commented

Maybe this will help?

commented

Or maybe your Java version is outdated? You can type java -version at the command prompt to check the version of Java that you're using.

commented

I'm using the latest version of Java. This was tested with the latest paper version at the time with the latest version of Java on a local machine, as well as a shockbyte server. I will run it with spigot and see what happens.

commented

@nanocodex can you send me your spigot JAR that works?

commented

Unfortunately, Github says that the file is over 10MB. So here's a link to download Buildtools instead (Buildtools will help prevent the spigot server from crashing, along with installing the server) :
https://www.spigotmc.org/wiki/buildtools/
The instructions to create a 1.15.1 spigot server will be in the description of the website as well.

commented

@hb432 Dude, switch to CRAFTBUKKIT. It now works for me!

commented

Nevermind, turns out that I was using an outdated build of version 1.15.1, so I think it's the server that's broken.

commented

I am using build #71 of papermc. I'm using my own plugin written in Kotlin to do the loading, but it failed on the 1.15.2 build. I got it to work on JDK 8 by doing this:

val engine = ScriptEngineManager(null).getEngineByName("nashorn")

Passing null to the ScriptManager fixed it. I got that from here: https://stackoverflow.com/a/25332851/1758461

commented

I'm new to ScriptCraft and the mc server. I was just trying to set this up and get it running. I had installed the Java JRE and I got this error. When I installed the Java JDK this error went away and scriptcraft seems to be working.

commented

The issue seems to start at paper version 63, I am submitting an issue on the paper github page to have this looked into further.

commented

Version 63 was the version paper (and upstream bukkit & spigot) were updated to 1.15.2. This is looking more and more like a compatibility issue with this new version of the game.

commented

@walterhiggins @jwulf
Walter, ScriptCraft now requires the JDK (Java SE 13.0.2) to run as of Minecraft 1.15.2. I thought that knowing this might be useful information, wouldn't have pinged you and Wulf otherwise.

commented

I'm now running on oracle/graalvm-ce:19.3.1-java8 and it's working for me.

commented

jwulf ur an absolute legend u know that

commented

The topic of Nashorn with JDK8 has been discussed in the Google Group. Graal might be the way to go at some point. @jwulf it would be nice to share notes with you about what you did there. I can add it into docs. Note from the linked forum post that Jonathan Perret provided some notes for anyone who is interested.

While Paper is a fork of Spigot (responding to "Dude, switch to CRAFTBUKKIT") to my knowledge ScriptCraft has never actually been tested with Paper enough to claim "support". So for anyone using Paper, please write up something (in a dedicated ticket which might lead to published documentation) about how and why.

About "ScriptCraft now requires the JDK (Java SE 13.0.2) to run as of Minecraft 1.15.2." - I don't think that's accurate. I just loaded 1.15.2 with 1.9 yesterday, haven't tested with SCJS yet. I hope we can get some concensus on details here.

commented

Magikcraft uses Scriptcraft with Paper 1.15.2 and GraalVM. Here is a working Docker image: https://hub.docker.com/r/magikcraft/scriptcraft. I've been running in production for years with it.

Mind you, with 1.15.2 Drones don't work - CraftEvil has been removed.