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:
[x] Replace MojangAPI client to use HttpURLConnection instead of the HttpClient that got introduct in Java 10.
[x] Replace usages of 'var' by explicit type annotations.
[x] Replace usages of static factory methods on collection interfaces.
[x] Replace CompletableFuture.orTimeout usages by cancellation tasks scheduled via the Scheduler if the .orTimeout methods used don't exist on the running Java platform.
[x] Finally, replace <release>11</release> by <release>8</release> for the maven modules Impl_1_8_8_R3, Impl_1_12_R1, Give_Impl_1_8_8_R3, Give_Impl_1_12_2_R1, Impl_Glowstone, Mojang_API, Utils, InvSee++_Common, InvSee++_Give_Common and InvSee++_Plugin and update the Java support table in the README file.
Note that InvSee++ will still require JDK-17 for compilation.
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:
<release>11</release>
by<release>8</release>
for the maven modulesImpl_1_8_8_R3
,Impl_1_12_R1
,Give_Impl_1_8_8_R3
,Give_Impl_1_12_2_R1
,Impl_Glowstone
,Mojang_API
,Utils
,InvSee++_Common
,InvSee++_Give_Common
andInvSee++_Plugin
and update the Java support table in the README file.Note that InvSee++ will still require JDK-17 for compilation.