Ships

Ships

123k Downloads

Won't Start at All

128912891289 opened this issue ยท 12 comments

commented

Describe the bug
The plugin won't start on 1.16.5. It won't even make the folder in the plugins folder.

To Reproduce

  1. Minecraft version: 1.16.5
  2. Platform: paper-1.16.5-794 and paper-1.16.5-777
  3. Ships version: Ships -b 6.0.0.0 R2 Beta 14.3

Log
[13:15:43] [Server thread/ERROR]: Could not load 'plugins\ShipsBukkit+.jar' in folder 'plugins'
org.bukkit.plugin.InvalidPluginException: java.lang.UnsupportedClassVersionError: org/core/implementation/bukkit/platform/plugin/boot/TranslateCoreBoot has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 52.0
at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:157) ~[patched_1.16.5.jar:git-Paper-794]
at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:414) ~[patched_1.16.5.jar:git-Paper-794]
at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:322) ~[patched_1.16.5.jar:git-Paper-794]
at org.bukkit.craftbukkit.v1_16_R3.CraftServer.loadPlugins(CraftServer.java:393) ~[patched_1.16.5.jar:git-Paper-794]
at net.minecraft.server.v1_16_R3.DedicatedServer.init(DedicatedServer.java:269) ~[patched_1.16.5.jar:git-Paper-794]
at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:1074) ~[patched_1.16.5.jar:git-Paper-794]
at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$a$0(MinecraftServer.java:291) ~[patched_1.16.5.jar:git-Paper-794]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_261]
Caused by: java.lang.UnsupportedClassVersionError: org/core/implementation/bukkit/platform/plugin/boot/TranslateCoreBoot has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 52.0
at java.lang.ClassLoader.defineClass1(Native Method) ~[?:1.8.0_261]
at java.lang.ClassLoader.defineClass(ClassLoader.java:756) ~[?:1.8.0_261]
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) ~[?:1.8.0_261]
at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:201) ~[patched_1.16.5.jar:git-Paper-794]
at java.lang.ClassLoader.loadClass(ClassLoader.java:418) ~[?:1.8.0_261]
at org.bukkit.plugin.java.PluginClassLoader.loadClass0(PluginClassLoader.java:119) ~[patched_1.16.5.jar:git-Paper-794]
at org.bukkit.plugin.java.PluginClassLoader.loadClass(PluginClassLoader.java:114) ~[patched_1.16.5.jar:git-Paper-794]
at java.lang.ClassLoader.loadClass(ClassLoader.java:351) ~[?:1.8.0_261]
at java.lang.Class.forName0(Native Method) ~[?:1.8.0_261]
at java.lang.Class.forName(Class.java:348) ~[?:1.8.0_261]
at org.bukkit.plugin.java.PluginClassLoader.(PluginClassLoader.java:82) ~[patched_1.16.5.jar:git-Paper-794]
at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:153) ~[patched_1.16.5.jar:git-Paper-794]
... 7 more

commented

Thanks for your help! I still can't seem to get it working though. Whenever I put both jar files into the plugins folder I get this error message in the console:

[21:48:59] [Server thread/ERROR]: Could not load 'plugins\TranslateCore-1.0-SNAPSHOT.jar' in folder 'plugins'
org.bukkit.plugin.InvalidDescriptionException: Invalid plugin.yml
at org.bukkit.plugin.java.JavaPluginLoader.getPluginDescription(JavaPluginLoader.java:178) ~[patched_1.16.5.jar:git-Paper-794]
at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:160) ~[patched_1.16.5.jar:git-Paper-794]
at org.bukkit.craftbukkit.v1_16_R3.CraftServer.loadPlugins(CraftServer.java:393) ~[patched_1.16.5.jar:git-Paper-794]
at net.minecraft.server.v1_16_R3.DedicatedServer.init(DedicatedServer.java:269) ~[patched_1.16.5.jar:git-Paper-794]
at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:1074) ~[patched_1.16.5.jar:git-Paper-794]
at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$a$0(MinecraftServer.java:291) ~[patched_1.16.5.jar:git-Paper-794]
at java.lang.Thread.run(Thread.java:831) [?:?]
Caused by: java.io.FileNotFoundException: Jar does not contain plugin.yml
... 7 more

So, I tried running the java -cp ./build/TranslateCoreBukkit.jar org.core.terminal.Terminal jar ShipsForCore/build/libs/ShipsForCore-1.0-SNAPSHOT.jar main org.ships.plugin.ShipsPlugin command but then it gives me this message:

[22:21:50] [Server thread/ERROR]: Could not load 'plugins\Standalone - ShipsForCore-1.0-SNAPSHOT.jar' in folder 'plugins'
org.bukkit.plugin.InvalidPluginException: Cannot find main class `org.core.implementation.bukkit.platform.plugin.boot.TranslateCoreBoot'
at org.bukkit.plugin.java.PluginClassLoader.(PluginClassLoader.java:84) ~[patched_1.16.5.jar:git-Paper-794]
at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:153) ~[patched_1.16.5.jar:git-Paper-794]
at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:414) ~[patched_1.16.5.jar:git-Paper-794]
at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:322) ~[patched_1.16.5.jar:git-Paper-794]
at org.bukkit.craftbukkit.v1_16_R3.CraftServer.loadPlugins(CraftServer.java:393) ~[patched_1.16.5.jar:git-Paper-794]
at net.minecraft.server.v1_16_R3.DedicatedServer.init(DedicatedServer.java:269) ~[patched_1.16.5.jar:git-Paper-794]
at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:1074) ~[patched_1.16.5.jar:git-Paper-794]
at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$a$0(MinecraftServer.java:291) ~[patched_1.16.5.jar:git-Paper-794]
at java.lang.Thread.run(Thread.java:831) [?:?]
Caused by: java.lang.ClassNotFoundException: org.core.implementation.bukkit.platform.plugin.boot.TranslateCoreBoot
at org.bukkit.plugin.java.PluginClassLoader.loadClass0(PluginClassLoader.java:155) ~[patched_1.16.5.jar:git-Paper-794]
at org.bukkit.plugin.java.PluginClassLoader.loadClass(PluginClassLoader.java:114) ~[patched_1.16.5.jar:git-Paper-794]
at java.lang.ClassLoader.loadClass(ClassLoader.java:519) ~[?:?]
at java.lang.Class.forName0(Native Method) ~[?:?]
at java.lang.Class.forName(Class.java:466) ~[?:?]
at org.bukkit.plugin.java.PluginClassLoader.(PluginClassLoader.java:82) ~[patched_1.16.5.jar:git-Paper-794]
... 8 more

I tried some stuff myself the other day, but I accidently deleted the files so I've been trying to recreate what I did because I had it to the point where it was running but wouldn't work on the server (but I don't think that it would really help that much at this point anymore since I'm not really sure what to do).
I tried just putting a plugin.yml file in the jar archive, but that doesn't seem to be working, so I was just wondering if you would be able to look at it again. Thanks again though! I really appreciate your support!

commented

So last night I updated the github to version beta 14.5 which had a small breaking change that ShipsForCore adapted to, however this didnt adapt on your branch so thats probably what caused the issue for you (causing a build failed)

Before I get started going through the whole build process again, I have just seen that my github Ships builder seemed to test every branch that gets updated, meaning that when I pushed the changes to your branch for the 14.5 update, it built Ships, so have a go with the one it created.

https://github.com/Minecraft-Ships/CoreGradle/actions/runs/2500542822

next commet will be building completely from scratch, ill also record everything so you can see what should be happening

commented

https://youtu.be/BcbuK1nGphY

IMAGE ALT TEXT HERE

Here are all the commands i ran in order

git clone --recurse-submodules https://github.com/Minecraft-Ships/CoreGradle.git
cd CoreGradle
.\gradlew buildPlugin
.\gradlew build
cd CoreToBukkit
git checkout 1.16.4-14.4
cd ..
.\gradlew buildPlugin
java -cp ./build/TranslateCoreBukkit.jar org.core.terminal.Terminal jar ShipsForCore/build/libs/ShipsForCore-1.0-SNAPSHOT.jar main org.ships.plugin.ShipsPlugin
commented

I appreciate the video! Thank you so much for all of your help it seems to be working completely fine now!! Thanks!!

commented

Good to know. Glad I could help :)

commented

Hi. This issue is due to your Java version being too low. Ships requires Java 17. Hope this helps

commented

Whenever I try to run Java 17 it says Unsupported Java detected (61.0). Only up to Java 16 is supported. When I tried Java 16.0.2 it gives me this error message:

[14:49:56] [Server thread/ERROR]: Could not load 'plugins\ShipsBukkit+.jar' in folder 'plugins'
org.bukkit.plugin.InvalidPluginException: java.lang.UnsupportedClassVersionError: org/core/implementation/bukkit/platform/plugin/boot/TranslateCoreBoot has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 60.0
at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:157) ~[patched_1.16.5.jar:git-Paper-794]
at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:414) ~[patched_1.16.5.jar:git-Paper-794]
at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:322) ~[patched_1.16.5.jar:git-Paper-794]
at org.bukkit.craftbukkit.v1_16_R3.CraftServer.loadPlugins(CraftServer.java:393) ~[patched_1.16.5.jar:git-Paper-794]
at net.minecraft.server.v1_16_R3.DedicatedServer.init(DedicatedServer.java:269) ~[patched_1.16.5.jar:git-Paper-794]
at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:1074) ~[patched_1.16.5.jar:git-Paper-794]
at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$a$0(MinecraftServer.java:291) ~[patched_1.16.5.jar:git-Paper-794]
at java.lang.Thread.run(Thread.java:831) [?:?]
Caused by: java.lang.UnsupportedClassVersionError: org/core/implementation/bukkit/platform/plugin/boot/TranslateCoreBoot has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 60.0
at java.lang.ClassLoader.defineClass1(Native Method) ~[?:?]
at java.lang.ClassLoader.defineClass(ClassLoader.java:1010) ~[?:?]
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150) ~[?:?]
at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:201) ~[patched_1.16.5.jar:git-Paper-794]
at java.lang.ClassLoader.loadClass(ClassLoader.java:586) ~[?:?]
at org.bukkit.plugin.java.PluginClassLoader.loadClass0(PluginClassLoader.java:119) ~[patched_1.16.5.jar:git-Paper-794]
at org.bukkit.plugin.java.PluginClassLoader.loadClass(PluginClassLoader.java:114) ~[patched_1.16.5.jar:git-Paper-794]
at java.lang.ClassLoader.loadClass(ClassLoader.java:519) ~[?:?]
at java.lang.Class.forName0(Native Method) ~[?:?]
at java.lang.Class.forName(Class.java:466) ~[?:?]
at org.bukkit.plugin.java.PluginClassLoader.(PluginClassLoader.java:82) ~[patched_1.16.5.jar:git-Paper-794]
at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:153) ~[patched_1.16.5.jar:git-Paper-794]
... 7 more

commented

Showing me the same crash again doesn't help.

I see the issue. Paper for 1.16.5 blocks Java 17. My testing servers are Paper 1.18.2, Spigot 1.17 and CraftBukkit 1.16.5 so that's why it didn't come up in my testing.

Sadly there isn't much that can be done unless your willing to compile Ships yourself using Java 16. I stopped supporting Java 16 when it lost support with Java (and therefore promoting with a iron fist good security)

commented

The new crash report is actually one that I ran with Java 16 compared to the original Java 8 one.

I'd be willing to compile Ships myself using Java 16 since I love the plugin, but I'm not familiar with how to. I tried following some tutorials online, but they don't seem to be working. Would you be able to briefly explain how to do it?

commented

Yep. So it's a little different thanks to the translation layer

So first your going to need to install the following

  • git (this makes it so you can download the code)
  • jdk 16 (Java development kit -> allows you to compile)

Once you got those ready, open up a terminal (cmd on windows) and navigate to a empty folder where you would like the code (on windows you can use the cd command to native -> or if it's easier, when inside a folder in exploror (my documents) at the top you can write in the address bar cmd and that will open cmd at that folder)

After that you want to get the code by using the following command

git clone --recurse-submodules https://github.com/Minecraft-Ships/CoreGradle.git

Once that is done, nativate your terminal into the newly created folder

Then run the following commands

./gradlew CoreToBukkit:buildPlugin

This will create the translation layer for Bukkit

Then

./gradlew ShipsForCore:build

This will compile the Ships plugin for the translation layer

At this point you have two .jar files and if you want to use ships with the two files separate you can, however you can also do the following command that combines the two

java -cp ./build/TranslateCoreBukkit.jar org.core.terminal.Terminal jar ShipsForCore/build/libs/ShipsForCore-1.0-SNAPSHOT.jar main org.ships.plugin.ShipsPlugin

This will then generate a single jar that you can use on the server.

Please also note that you may need to open the build.gralde file and change the Source version to 16 and change the paper version to 1.16.5.

I believe there is also some 1.17+ code in ships so by changing the paper version, it may complain of that code. You can strip it out and then try compiling again as the code checks that it's 1.17+ before running it

commented

Hey thanks for the detailed response! I've been trying for the past couple days now, but I can't seem to get it working.

I'm able to get it working normally, but after changing the source version and the paper versions for 1.16.5, I can't seem to remove the 1.17+ code right for it to compile properly.

I was wondering if you would be able to try and see if you could get it working since you're more familiar with your code? Thanks again for your help!

commented

Sure, so just changed it myself and found it was a lot more then I expected, so sorry about that.

I have made some changes on another branch to remove the offending code. You can find it here
https://github.com/Minecraft-Ships/CoreToBukkit/tree/1.16.4-14.4

as for commands,

if you open your terminal to CoreToBukkit folder and then do the following commands

git pull
git checkout 1.16.4-14.4
cd ..

then build as normal

.\gradlew CoreToBukkit:buildPlugin

The ships part should already be fine as I belive it already have the Java 16 mark