EvModder / DropHeads

A highly configurable head collecting plugin for Minecraft
GNU Lesser General Public License v3.0
36 stars 29 forks source link

DropHeads v3.9.4.2 Spigot issue #112

Closed Al3xBogo closed 4 months ago

Al3xBogo commented 4 months ago

The following error appears in the console on the latest Spigot and CraftBukkit 1.21 builds (default config). Oddly enough, DropHeads enables and functions perfectly on Paper's 1.21 experimental builds.

[01:32:04] [Server thread/INFO]: [DropHeads] Enabling DropHeads v3.9.4.2
[01:32:04] [Server thread/ERROR]: Error occurred while enabling DropHeads v3.9.4.2 (Is it up to date?)
java.lang.ExceptionInInitializerError: null
    at net.evmodder.DropHeads.DropHeads.onEvEnable(DropHeads.java:84) ~[?:?]
    at net.evmodder.EvLib.EvPlugin.onEnable(EvPlugin.java:43) ~[?:?]
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:267) ~[spigot-api-1.21-R0.1-SNAPSHOT.jar:?]
    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:342) ~[spigot-api-1.21-R0.1-SNAPSHOT.jar:?]
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:492) ~[spigot-api-1.21-R0.1-SNAPSHOT.jar:?]
    at org.bukkit.craftbukkit.v1_21_R1.CraftServer.enablePlugin(CraftServer.java:567) ~[spigot-1.21-R0.1-SNAPSHOT.jar:4242-Spigot-0a642bd-515fe49]
    at org.bukkit.craftbukkit.v1_21_R1.CraftServer.enablePlugins(CraftServer.java:481) ~[spigot-1.21-R0.1-SNAPSHOT.jar:4242-Spigot-0a642bd-515fe49]
    at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:641) ~[spigot-1.21-R0.1-SNAPSHOT.jar:4242-Spigot-0a642bd-515fe49]
    at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:426) ~[spigot-1.21-R0.1-SNAPSHOT.jar:4242-Spigot-0a642bd-515fe49]
    at net.minecraft.server.dedicated.DedicatedServer.e(DedicatedServer.java:269) ~[spigot-1.21-R0.1-SNAPSHOT.jar:4242-Spigot-0a642bd-515fe49]
    at net.minecraft.server.MinecraftServer.y(MinecraftServer.java:1017) ~[spigot-1.21-R0.1-SNAPSHOT.jar:4242-Spigot-0a642bd-515fe49]
    at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:318) ~[spigot-1.21-R0.1-SNAPSHOT.jar:4242-Spigot-0a642bd-515fe49]
    at java.base/java.lang.Thread.run(Thread.java:1583) [?:?]
Caused by: java.lang.RuntimeException: no class found: net.minecraft.core.HolderLookup$Provider
    at net.evmodder.EvLib.extras.ReflectionUtils.getRefClass(ReflectionUtils.java:96) ~[?:?]
    at net.evmodder.DropHeads.JunkUtils.<clinit>(JunkUtils.java:122) ~[?:?]
    ... 13 more

The plugin does not disable but it does not seem to function properly either. Running any DropHeads command returns its usage.

I understand that these builds are for 1.20.6, but I find it very odd that they function perfectly on Paper's 1.21 builds, but not Spigot's. I have very limited Spigot/Java knowledge (can't even figure out how to compile this plugin), otherwise I would probably have been more helpful with my details.

I also just tested v3.9.4.2 on Spigot 1.20.6 and get similar errors but a different output.

[01:44:29] [Server thread/INFO]: [DropHeads] Enabling DropHeads v3.9.4.2
[01:44:29] [Server thread/INFO]: [DropHeads] Could not locate config-DropHeads.yml file!
[01:44:29] [Server thread/INFO]: [DropHeads] Generating a new one with default settings.
[01:44:29] [Server thread/ERROR]: Error occurred while enabling DropHeads v3.9.4.2 (Is it up to date?)
java.lang.ExceptionInInitializerError: null
    at net.evmodder.DropHeads.DropHeads.onEvEnable(DropHeads.java:84) ~[?:?]
    at net.evmodder.EvLib.EvPlugin.onEnable(EvPlugin.java:43) ~[?:?]
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:267) ~[spigot-api-1.20.6-R0.1-SNAPSHOT.jar:?]
    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:342) ~[spigot-api-1.20.6-R0.1-SNAPSHOT.jar:?]
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:492) ~[spigot-api-1.20.6-R0.1-SNAPSHOT.jar:?]
    at org.bukkit.craftbukkit.v1_20_R4.CraftServer.enablePlugin(CraftServer.java:564) ~[spigot-1.20.6-R0.1-SNAPSHOT.jar:4195-Spigot-fcd94e2-f057cf4]
    at org.bukkit.craftbukkit.v1_20_R4.CraftServer.enablePlugins(CraftServer.java:478) ~[spigot-1.20.6-R0.1-SNAPSHOT.jar:4195-Spigot-fcd94e2-f057cf4]
    at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:634) ~[spigot-1.20.6-R0.1-SNAPSHOT.jar:4195-Spigot-fcd94e2-f057cf4]
    at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:419) ~[spigot-1.20.6-R0.1-SNAPSHOT.jar:4195-Spigot-fcd94e2-f057cf4]
    at net.minecraft.server.dedicated.DedicatedServer.e(DedicatedServer.java:265) ~[spigot-1.20.6-R0.1-SNAPSHOT.jar:4195-Spigot-fcd94e2-f057cf4]
    at net.minecraft.server.MinecraftServer.y(MinecraftServer.java:1010) ~[spigot-1.20.6-R0.1-SNAPSHOT.jar:4195-Spigot-fcd94e2-f057cf4]
    at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:311) ~[spigot-1.20.6-R0.1-SNAPSHOT.jar:4195-Spigot-fcd94e2-f057cf4]
    at java.base/java.lang.Thread.run(Thread.java:1583) [?:?]
Caused by: java.lang.RuntimeException: no such method
    at net.evmodder.EvLib.extras.ReflectionUtils$RefClass.findMethod(ReflectionUtils.java:194) ~[?:?]
    at net.evmodder.DropHeads.JunkUtils.<clinit>(JunkUtils.java:226) ~[?:?]
    ... 13 more

The plugin again works perfectly on 1.20.6 Paper. I apologize for any poor formatting in this issue report, this is my first time creating one

EvModder commented 4 months ago

Thanks for reporting, and no worries about the formatting i'm not picky about that and honestly it's helpful to have the full error :-) IRL has gotten me busy lately so I haven't tested the plugin with 1.21 yet, but I'll be getting the plugin properly updated this weekend (or sooner).

And I'll also make sure it's fixed on 1.20.6 CB/Spigot.. I'm surprised it broke there since my test server is CB 1.20.6, but I know Spigot has been making some sub-version changes in their API recently and it's very possible I missed something in-between different 1.20.6 builds

Al3xBogo commented 4 months ago

No worries at all! I truly appreciate the help and all the work you put into this amazing plugin!

The DropHeads_v3.9.5.jar you've added yesterday seems to have fixed the issue, and it now works perfectly on Spigot 1.20.6 and 1.21 with my testing!

EvModder commented 4 months ago

I'm glad to hear that! and thanks for letting me know it works, I am never confident enough in my own testing.

I have a v3.9.6 which fixes a few other big issues in 1.21 (like looting enchant not applying) which is available on the GitHub and should be posted to Bukkit soon as well