Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 3.4.1 refused to load in 1.20.1 #94

Open
CloudeLecaw opened this issue May 4, 2023 · 12 comments
Open

Version 3.4.1 refused to load in 1.20.1 #94

CloudeLecaw opened this issue May 4, 2023 · 12 comments

Comments

@CloudeLecaw
Copy link

Greetings. is there any change to get Support or at least a running version for 1.19.4? The last here announced one was working fine for 1.19.2 (we skilled 1.19.3) and in 1.19.4 it refused to load.
At the moment in 1.19.4 we just see this one :(

[00:57:26 INFO]: [GameBox] Loading server plugin GameBox v3.4.1
[00:57:26 INFO]: [GameBox] Enabling GameBox v3.4.1
[00:57:26 INFO]: + - + - + - + - + - + - + - + - + - + - + - + - + - + - +
[00:57:26 INFO]:  Your server version is not compatible with this plugin!
[00:57:26 INFO]:    Please make sure that you have the newest version:
[00:57:26 INFO]:    https://www.spigotmc.org/resources/37273/
[00:57:26 INFO]: + - + - + - + - + - + - + - + - + - + - + - + - + - + - +
[00:57:26 INFO]: [GameBox] Disabling GameBox v3.4.1
@CloudeLecaw CloudeLecaw changed the title Version 3.4.1 refused to load in 1.19.4 Version 3.4.1 refused to load in 1.20.1 Jul 10, 2023
@CloudeLecaw
Copy link
Author

CloudeLecaw commented Jul 10, 2023

Well the latested Version found on Discord was working in 1.19.4 (except the multiplayer part)
https://cdn.discordapp.com/attachments/404605581261799425/1023602458632663050/GameBox.jar

Now in 1.20.1 it refused to load aggain with this message. :(
Well i hope you can update it aggain :3

@Hunter99011
Copy link

Hunter99011 commented Sep 2, 2023

any update? 👍

@NiklasEi
Copy link
Owner

NiklasEi commented Sep 3, 2023

No, I haven't had the time and motivation to get back to GameBox.
For 1.20 the build is currently failing because of a snakeyml update in Bukkit/Spigot. I would be very happy about any help on this. It would be nice to have a build that works with all current MC versions again, so I could upload it to Spigot. The official build there still only supports MC up to 1.16.

@CloudeLecaw
Copy link
Author

hmm the compiles github version just giving me this

[13:26:10] [Server thread/INFO]: [GameBox] Loading server plugin GameBox v3.4.0
[13:26:10] [Server thread/INFO]: [GameBox] Enabling GameBox v3.4.0
[13:26:10] [Server thread/ERROR]: Error occurred while enabling GameBox v3.4.0 (Is it up to date?)
java.lang.NoSuchMethodError: 'void org.yaml.snakeyaml.constructor.CustomClassLoaderConstructor.<init>(java.lang.ClassLoader)'
	at me.nikl.gamebox.utility.GameBoxYmlBuilder.buildLocalModuleDataYml(GameBoxYmlBuilder.java:28) ~[GameBox_3.4.0.jar:?]
	at me.nikl.gamebox.module.local.LocalModule.<clinit>(LocalModule.java:44) ~[GameBox_3.4.0.jar:?]
	at me.nikl.gamebox.GameBoxSettings.defineGameBoxData(GameBoxSettings.java:192) ~[GameBox_3.4.0.jar:?]
	at me.nikl.gamebox.GameBox.onEnable(GameBox.java:77) ~[GameBox_3.4.0.jar:?]
	at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:281) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?]
	at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.enablePlugin(PaperPluginInstanceManager.java:189) ~[paper-1.20.1.jar:git-Paper-196]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
	at com.rylinaux.plugman.util.PaperPluginUtil.load(PaperPluginUtil.java:421) ~[PlugManX_2.3.5.jar:?]
	at com.rylinaux.plugman.command.LoadCommand.execute(LoadCommand.java:116) ~[PlugManX_2.3.5.jar:?]
	at com.rylinaux.plugman.PlugManCommandHandler.onCommand(PlugManCommandHandler.java:97) ~[PlugManX_2.3.5.jar:?]
	at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?]
	at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:155) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?]
	at org.bukkit.craftbukkit.v1_20_R1.CraftServer.dispatchCommand(CraftServer.java:987) ~[paper-1.20.1.jar:git-Paper-196]
	at org.bukkit.craftbukkit.v1_20_R1.CraftServer.dispatchServerCommand(CraftServer.java:972) ~[paper-1.20.1.jar:git-Paper-196]
	at net.minecraft.server.dedicated.DedicatedServer.handleConsoleInputs(DedicatedServer.java:500) ~[paper-1.20.1.jar:git-Paper-196]
	at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:447) ~[paper-1.20.1.jar:git-Paper-196]
	at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1393) ~[paper-1.20.1.jar:git-Paper-196]
	at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1170) ~[paper-1.20.1.jar:git-Paper-196]
	at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:317) ~[paper-1.20.1.jar:git-Paper-196]
	at java.lang.Thread.run(Thread.java:833) ~[?:?]
[13:26:10] [Server thread/INFO]: [GameBox] Disabling GameBox v3.4.0

hm so might 1.20.1 (1.20.2) support will never come :3

@InjectedPie
Copy link

InjectedPie commented Nov 27, 2023

I think it breaks due to snakeyaml upgrade to 2.0 in spigot 1.20.x
More specific the ModulesManager -> loadLocalModules and dumpModuleSettings maybe at other places

@NiklasEi
Copy link
Owner

NiklasEi commented Nov 27, 2023

I think it breaks due to snakeyaml upgrade to 2.0 in spigot 1.20.x

Yes it does. I am using some reflection to load yaml files and that no longer works. Last time I looked into this I was unable to find a migration guide or any other docs on how to do this with snakeyaml 2.0.

@InjectedPie
Copy link

I actually fixed all your class loading issues + made a work around for your missing nmsutil class - I've made a local port of that one. But I'm struggling with java ssl errors

@InjectedPie
Copy link

InjectedPie commented Nov 27, 2023

master...InjectedPie:gamebox:master

loadModuleSettings:
CustomClassLoaderConstructor constructor = new CustomClassLoaderConstructor(ModulesSettings.class.getClassLoader(), new LoaderOptions()); Representer representer = new Representer(new DumperOptions());
dumpModuleSettings:
CustomClassLoaderConstructor constructor = new CustomClassLoaderConstructor(ModulesSettings.class.getClassLoader(), new LoaderOptions());

GameboxYmlBuilder:
CustomClassLoaderConstructor constructor = new CustomClassLoaderConstructor(LocalModuleData.class.getClassLoader(), new LoaderOptions()); Representer representer = new Representer(new DumperOptions());

@NiklasEi
Copy link
Owner

Thanks for looking into it!

I actually fixed all your class loading issues

Does that build and run for you? I get a bunch of errors including some like this:

[ERROR] /home/niklas/code/gamebox/src/main/java/me/nikl/gamebox/module/ModulesManager.java:[136,35] constructor Representer in class org.yaml.snakeyaml.representer.Representer cannot be applied to given types;
[ERROR]   required: no arguments
[ERROR]   found:    org.yaml.snakeyaml.DumperOptions
[ERROR]   reason: actual and formal argument lists differ in length

made a work around for your missing nmsutil class - I've made a local port of that one.

The nmsutilities are hosted here: https://repo.repsy.io/mvn/nikl/minecraft/me/nikl/nmsutilities/

@KyreusR
Copy link

KyreusR commented Nov 27, 2023

Did you downgrade snakeyaml again? The older version didn't expect any arguments on that call. The newer one wants the DumperOptions. - I actually didn't look much into it, just gave it empty "LoadOptions" and "DumperOptions" where asked for. Not sure if this will work with the running plugin, but I can't test it due to ssl errors.
Are your .pem files still up to date? Or are newer ones available?

Regarding your nmsutilities - I've created a PR for 1.20.2

@InjectedPie
Copy link

InjectedPie commented Nov 27, 2023

did you update your pom ?
forgot to upload them sorry
InjectedPie@1b5eb4c

@NiklasEi
Copy link
Owner

Ah, you depend on the newest spigot now, then snakeyaml V2 makes sense. I tried to install it manually to stay compatible with older versions, but didn't manage to get that to work.

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

No branches or pull requests

5 participants