ProtocolLib

3M Downloads

Reload plugin that has depends on protocollib causes it protocollib to malfunction

JVerbruggen opened this issue ยท 0 comments

commented

Describe the bug
My plugin has a dependency on ProtocolLib, which is provided to the plugin by my paperspigot server. After restarting the server, everything works fine. But after reloading my own plugin with PlugMan (an excellent plugin manager), I get the following error message:

java.lang.LinkageError: loader constraint violation in interface itable initialization for class com.comphenix.protocol.injector.StructureCache$1: when selecting method 'void com.comphenix.protocol.reflect.compiler.CompileListener.onCompiled(com.comphenix.protocol.reflect.StructureModifier)' the class loader org.bukkit.plugin.java.PluginClassLoader @32f7e49b for super interface com.comphenix.protocol.reflect.compiler.CompileListener, and the class loader org.bukkit.plugin.java.PluginClassLoader @2a64ff74 of the selected method's class, com.comphenix.protocol.injector.StructureCache$1 have different Class objects for the type com.comphenix.protocol.reflect.StructureModifier used in the signature (com.comphenix.protocol.reflect.compiler.CompileListener is in unnamed module of loader org.bukkit.plugin.java.PluginClassLoader @32f7e49b, parent loader 'app'; com.comphenix.protocol.injector.StructureCache$1 is in unnamed module of loader org.bukkit.plugin.java.PluginClassLoader @2a64ff74, parent loader 'app')
        at com.comphenix.protocol.injector.StructureCache.getStructure(StructureCache.java:127) ~[?:?]
        at com.comphenix.protocol.injector.StructureCache.getStructure(StructureCache.java:73) ~[?:?]
        at com.comphenix.protocol.events.PacketContainer.<init>(PacketContainer.java:128) ~[?:?]
        at com.comphenix.protocol.events.PacketContainer.<init>(PacketContainer.java:119) ~[?:?]
        at nl.greekcraft.gcshops.storage.atm.ATMPlusMarkClientSide.sendSpawnPacket(ATMPlusMarkClientSide.java:66) ~[?:?]
        at nl.greekcraft.gcshops.storage.atm.ATMPlusMarkClientSide.spawn(ATMPlusMarkClientSide.java:58) ~[?:?]
        at nl.greekcraft.gcshops.events.atm.ATMClick.onClickATM(ATMClick.java:49) ~[?:?]
        at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor2647.execute(Unknown Source) ~[?:?]
        at org.bukkit.plugin.EventExecutor.lambda$create$1(EventExecutor.java:69) ~[patched_1.16.5.jar:git-Paper-582]
        at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80) ~[patched_1.16.5.jar:git-Paper-582]
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[patched_1.16.5.jar:git-Paper-582]
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:607) ~[patched_1.16.5.jar:git-Paper-582]
        at net.minecraft.server.v1_16_R3.PlayerConnection.a(PlayerConnection.java:2343) ~[patched_1.16.5.jar:git-Paper-582]
        at net.minecraft.server.v1_16_R3.PacketPlayInUseEntity.a(PacketPlayInUseEntity.java:55) ~[patched_1.16.5.jar:git-Paper-582]
        at net.minecraft.server.v1_16_R3.PacketPlayInUseEntity.a(PacketPlayInUseEntity.java:12) ~[patched_1.16.5.jar:git-Paper-582]
        at net.minecraft.server.v1_16_R3.PlayerConnectionUtils.lambda$ensureMainThread$1(PlayerConnectionUtils.java:35) ~[patched_1.16.5.jar:git-Paper-582]
        at net.minecraft.server.v1_16_R3.TickTask.run(SourceFile:18) ~[patched_1.16.5.jar:git-Paper-582]
        at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.executeTask(IAsyncTaskHandler.java:136) ~[patched_1.16.5.jar:git-Paper-582]
        at net.minecraft.server.v1_16_R3.IAsyncTaskHandlerReentrant.executeTask(SourceFile:23) ~[patched_1.16.5.jar:git-Paper-582]
        at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.executeNext(IAsyncTaskHandler.java:109) ~[patched_1.16.5.jar:git-Paper-582]
        at net.minecraft.server.v1_16_R3.MinecraftServer.bb(MinecraftServer.java:1252) ~[patched_1.16.5.jar:git-Paper-582]
        at net.minecraft.server.v1_16_R3.MinecraftServer.executeNext(MinecraftServer.java:1245) ~[patched_1.16.5.jar:git-Paper-582]
        at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.awaitTasks(IAsyncTaskHandler.java:119) ~[patched_1.16.5.jar:git-Paper-582]
        at net.minecraft.server.v1_16_R3.MinecraftServer.sleepForTick(MinecraftServer.java:1206) ~[patched_1.16.5.jar:git-Paper-582]
        at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:1120) ~[patched_1.16.5.jar:git-Paper-582]
        at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$a$0(MinecraftServer.java:289) ~[patched_1.16.5.jar:git-Paper-582]
        at java.lang.Thread.run(Thread.java:830) [?:?]

Reloading all plugins using /reload confirm does work, but is not a good solution in this case.

Version Info
https://pastebin.com/3w6Ja5Sf