Skip to content
This repository has been archived by the owner on Nov 1, 2021. It is now read-only.

Please make IonSpigot java 16 compatible? #12

Open
richiedevs opened this issue Jul 26, 2021 · 9 comments
Open

Please make IonSpigot java 16 compatible? #12

richiedevs opened this issue Jul 26, 2021 · 9 comments

Comments

@richiedevs
Copy link

IonSpigot works fine on java 8, but when running it with Java 16, it returns with the error:

Exception in thread "main" java.lang.NullPointerException: Cannot invoke "org.apache.commons.lang3.JavaVersion.atLeast(org.apache.commons.lang3.JavaVersion)" because "org.apache.commons.lang3.SystemUtils.JAVA_SPECIFICATION_VERSION_AS_ENUM" is null
        at org.apache.commons.lang3.SystemUtils.isJavaVersionAtLeast(SystemUtils.java:1413)
        at org.bukkit.craftbukkit.Main.main(Main.java:23)

I believe it would be a nice addition to let IonSpigot be able to run on Java 16, and it would offer more compatibility between using different java versions, as an example - minecraft 1.17 and 1.18 requires something like java 11 or java 16 to run, and this is why I'm requesting this. I hope IonSpigot adds Java 16 support

@richiedevs
Copy link
Author

richiedevs commented Jul 26, 2021

I think the 0001-POM-Changes.patch file in PaperSpigot-Server-Patches causes this error, because it contains

if (!SystemUtils.isJavaVersionAtLeast(JavaVersion.JAVA_1_8)) {

@richiedevs richiedevs changed the title Support Java 16? Please make IonSpigot java 16 compatible? Jul 26, 2021
@Sculas
Copy link

Sculas commented Jul 26, 2021

No. This is not the case.
The reason Java 16 won't work on IonSpigot is due to the fact that Minecraft 1.8.8 and some 1.8 forks like IonSpigot use an older version of Netty that doesn't support the Java 11 stuff. You need to update Netty and fix a big mess of code to make it work with Java 11+. After that, you'll find out a lot of plugins are broken now :) Then you'll need to patch these, using Reflection or bytecode editing.

@richiedevs
Copy link
Author

Got it, well - i usually custom code my plugins so plugins shouldnt be an issue for me

@Samsuik
Copy link
Owner

Samsuik commented Aug 10, 2021

I'm not going to be adding support for later versions of java anytime soon. I don't know how to do this properly, I tried this out on another jar of mine a while ago. Updating netty and removing the java version check but it led to protocollib sometimes locking up the server when starting up. I didn't check to see if this was a plugin issue. I'm open for pull requests on this.

@Sculas
Copy link

Sculas commented Aug 10, 2021

The latest version of ProtocolLib fixed that. (4.7.0)

@Samsuik
Copy link
Owner

Samsuik commented Aug 10, 2021

I might give that a try then. I was running 4.5.1 during my testing.

@richiedevs
Copy link
Author

Thats awesome, would love java 11/16 support

@Samsuik
Copy link
Owner

Samsuik commented Aug 15, 2021

I did some work on this in the netty-update branch. It does appear to work with the minimal testing I've done so far. I'm able to run Ion on my other system which is running linux with Java 11 and connect with my laptop and vise versa. Running ProtocolLib, Viaversion, Viabackwards and Viarewind I was able to connect using 1.17 on my laptop to my other system.

@Sculas
Copy link

Sculas commented Aug 15, 2021

Note though that iirc, Citizens doesn't work correctly and needs to be patched using Javassist. But it might be different now

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants