Checklist
What behaviour is observed?
The plugin AxAuctions does load without an error on paper, but when starting the server with Leaf and the Plugin this error comes in the console and the plugin disables itself.
I think it has something to do with the snakeyaml version. Paper still uses "org.yaml:snakeyaml:2.2", but Leaf upgraded independent of Paper to "org.yaml:snakeyaml:2.5", which is not supported by the plugin because it targets paper.
[23:37:18 INFO]: [AxAuctions] Enabling AxAuctions v1.31.0
[23:37:18 INFO]: ╠ Downloading en_us language files.. (version: 1.21.8)
[23:37:19 ERROR]: Error occurred while enabling AxAuctions v1.31.0 (Is it up to date?)
java.lang.NoClassDefFoundError: org/yaml/snakeyaml/external/biz/base64Coder/Base64Coder
at AxAuctions-1.31.0.jar//com.artillexstudios.axauctions.lang.LanguageManager.reload(LanguageManager.java:53) ~[?:?]
at AxAuctions-1.31.0.jar//com.artillexstudios.axauctions.AxAuctions.enable(AxAuctions.java:123) ~[?:?]
at AxAuctions-1.31.0.jar//com.artillexstudios.axauctions.libs.axapi.AxPlugin.onEnable(AxPlugin.java:146) ~[?:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:280) ~[leaf-api-1.21.8-R0.1-SNAPSHOT.jar:?]
at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.enablePlugin(PaperPluginInstanceManager.java:202) ~[leaf-1.21.8.jar:1.21.8-160-c706428]
at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.enablePlugin(PaperPluginManagerImpl.java:109) ~[leaf-1.21.8.jar:1.21.8-160-c706428]
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:519) ~[leaf-api-1.21.8-R0.1-SNAPSHOT.jar:?]
at org.bukkit.craftbukkit.CraftServer.enablePlugin(CraftServer.java:671) ~[leaf-1.21.8.jar:1.21.8-160-c706428]
at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:627) ~[leaf-1.21.8.jar:1.21.8-160-c706428]
at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:743) ~[leaf-1.21.8.jar:1.21.8-160-c706428]
at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:488) ~[leaf-1.21.8.jar:1.21.8-160-c706428]
at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:332) ~[leaf-1.21.8.jar:1.21.8-160-c706428]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1185) ~[leaf-1.21.8.jar:1.21.8-160-c706428]
at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:298) ~[leaf-1.21.8.jar:1.21.8-160-c706428]
at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]
Caused by: java.lang.ClassNotFoundException: org.yaml.snakeyaml.external.biz.base64Coder.Base64Coder
at org.bukkit.plugin.java.PluginClassLoader.loadClass0(PluginClassLoader.java:205) ~[leaf-api-1.21.8-R0.1-SNAPSHOT.jar:?]
at org.bukkit.plugin.java.PluginClassLoader.loadClass(PluginClassLoader.java:172) ~[leaf-api-1.21.8-R0.1-SNAPSHOT.jar:?]
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526) ~[?:?]
... 15 more
[23:37:19 INFO]: [AxAuctions] Disabling AxAuctions v1.31.0
[23:37:19 ERROR]: Error occurred while disabling AxAuctions v1.31.0
java.lang.NullPointerException: Cannot invoke "com.artillexstudios.axauctions.database.Database.disable()" because "com.artillexstudios.axauctions.AxAuctions.database" is null
at AxAuctions-1.31.0.jar//com.artillexstudios.axauctions.AxAuctions.disable(AxAuctions.java:194) ~[?:?]
at AxAuctions-1.31.0.jar//com.artillexstudios.axauctions.libs.axapi.AxPlugin.onDisable(AxPlugin.java:172) ~[?:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:286) ~[leaf-api-1.21.8-R0.1-SNAPSHOT.jar:?]
at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.disablePlugin(PaperPluginInstanceManager.java:237) ~[leaf-1.21.8.jar:1.21.8-160-c706428]
at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.disablePlugin(PaperPluginManagerImpl.java:114) ~[leaf-1.21.8.jar:1.21.8-160-c706428]
at org.bukkit.plugin.SimplePluginManager.disablePlugin(SimplePluginManager.java:549) ~[leaf-api-1.21.8-R0.1-SNAPSHOT.jar:?]
at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.enablePlugin(PaperPluginInstanceManager.java:206) ~[leaf-1.21.8.jar:1.21.8-160-c706428]
at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.enablePlugin(PaperPluginManagerImpl.java:109) ~[leaf-1.21.8.jar:1.21.8-160-c706428]
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:519) ~[leaf-api-1.21.8-R0.1-SNAPSHOT.jar:?]
at org.bukkit.craftbukkit.CraftServer.enablePlugin(CraftServer.java:671) ~[leaf-1.21.8.jar:1.21.8-160-c706428]
at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:627) ~[leaf-1.21.8.jar:1.21.8-160-c706428]
at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:743) ~[leaf-1.21.8.jar:1.21.8-160-c706428]
at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:488) ~[leaf-1.21.8.jar:1.21.8-160-c706428]
at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:332) ~[leaf-1.21.8.jar:1.21.8-160-c706428]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1185) ~[leaf-1.21.8.jar:1.21.8-160-c706428]
at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:298) ~[leaf-1.21.8.jar:1.21.8-160-c706428]
at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]
What is the expected behavior?
The plugin loads without an error normaly.
How to reproduce?
- Put AxAuctions Plugin in the Plugin folder.
- Start the Server.
- See the error in the console and that it is red in /pl.
Spark profiler link
https://spark.lucko.me/fld4BUuKF7
Error log (if applicable)
https://mclo.gs/JdCcYd0
Checklist
What behaviour is observed?
The plugin AxAuctions does load without an error on paper, but when starting the server with Leaf and the Plugin this error comes in the console and the plugin disables itself.
I think it has something to do with the snakeyaml version. Paper still uses "org.yaml:snakeyaml:2.2", but Leaf upgraded independent of Paper to "org.yaml:snakeyaml:2.5", which is not supported by the plugin because it targets paper.
What is the expected behavior?
The plugin loads without an error normaly.
How to reproduce?
Spark profiler link
https://spark.lucko.me/fld4BUuKF7
Error log (if applicable)
https://mclo.gs/JdCcYd0
Hi, it's because there is a plugin that is using deprecated library methods from SnakeYAML.
SnakeYAML removed the
Base64Coderclass since version 2.3, see snakeyaml#3f0beda.So, it's not recommended to continue relying on it.
As the best practice, it's better to use the built-in Base64 utility methods provided by Java (
java.util.Base64)Please check the stacktrace to identify which plugin is using
Base64Coderand report it to the plugin's support team to let them migrate the implementation.For most cases, if the plugin just simply uses:
Base64Coder#encodeLinesBase64Coder#decodeLinesto encode/decode ItemStack data or other serialized objects.
These can be directly replaced with:
Base…