Jannyboy11 / InvSee-plus-plus

A bukkit plugin for manipulating player inventories
Other
93 stars 17 forks source link

Java 8 support for old Minecraft versions. #70

Closed Jannyboy11 closed 10 months ago

Jannyboy11 commented 1 year ago

I know I've said I wouldn't do this, but there's a legitimate reason for supporting this. InvSee++ support CraftBukkit 1.8.8, but CraftBukkit 1.8.8 supports only Java 11 and later if native-transport is disabled. So when CraftBukkit 1.8.8 is run on Linux (and Netty detects Epoll) and Java 11 or later, the unsafe code that Netty uses in order to use Epoll no longer works on Java 11.

So in order for InvSee++ to work in this configuration (CraftBukkit 1.8.8 with native-transport enbaled on Linux), InvSee++ needs to be able to run on Java 8. The alternative would be that server owners fork CraftBukkit and update their Netty dependency which is undesirable since it's bad UX. While we are at it, we may also want to compile the Glowstone impl for Java 8 since Glowstone uses an old version of ASM which doesn't support anything newer than the Java 8 bytecode format (and I created a fork of Glowstone in order to test functionality).

In order to support Java 8, we have to perform the following tasks:

Note that InvSee++ will still require JDK-17 for compilation.

Jannyboy11 commented 10 months ago

See PR https://github.com/Jannyboy11/InvSee-plus-plus/pull/95