-
-
Notifications
You must be signed in to change notification settings - Fork 261
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
PacketAdapter #3342
Comments
Aren't you shading ProtocolLib? |
Your repo is not available so we cannot see your source code. |
Sorry about that its now public forget making repos from IntelliJ are Private by default |
Set ProtocolLib as compileOnly dependency. |
repositories {
maven { url "https://repo.dmulloy2.net/repository/public/" }
}
dependencies {
compileOnly 'com.comphenix.protocol:ProtocolLib:5.1.0'
} |
its happening the same for me with every packet listener. NoClassDefFound and my plugin gets unloaded. I have ProtoclLib as a Dependency on my build.gradle and installed on my server, and it keeps throwing me that exception. |
Also check if ProtocolLib supports the current server version that you're using. |
Make sure you're doing the following
/reload
Describe the question
Why am I getting the following error when I have ProtocolLib in the Projects dependencies and the JAR file is in the plugins folder:
[19:27:29 ERROR]: Error occurred while enabling ClientInfo v1.0 (Is it up to date?) java.lang.NoClassDefFoundError: com/comphenix/protocol/events/PacketAdapter at java.base/java.lang.ClassLoader.defineClass1(Native Method) ~[?:?] at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1027) ~[?:?] at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150) ~[?:?] at io.papermc.paper.plugin.entrypoint.classloader.PaperSimplePluginClassLoader.findClass(PaperSimplePluginClassLoader.java:103) ~[purpur-1.21.4.jar:1.21.4-2376-4bf1b98] at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:593) ~[?:?] at io.papermc.paper.plugin.entrypoint.classloader.PaperPluginClassLoader.loadClass(PaperPluginClassLoader.java:118) ~[purpur-1.21.4.jar:1.21.4-2376-4bf1b98] at io.papermc.paper.plugin.entrypoint.classloader.PaperPluginClassLoader.loadClass(PaperPluginClassLoader.java:107) ~[purpur-1.21.4.jar:1.21.4-2376-4bf1b98] at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526) ~[?:?] at ClientInfo-1.0-SNAPSHOT.jar/net.kaijane.clientInfo.ClientInfo.onEnable(ClientInfo.java:15) ~[ClientInfo-1.0-SNAPSHOT.jar:?] at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:288) ~[purpur-api-1.21.4-R0.1-SNAPSHOT.jar:?] at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.enablePlugin(PaperPluginInstanceManager.java:202) ~[purpur-1.21.4.jar:1.21.4-2376-4bf1b98] at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.enablePlugin(PaperPluginManagerImpl.java:109) ~[purpur-1.21.4.jar:1.21.4-2376-4bf1b98] at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:520) ~[purpur-api-1.21.4-R0.1-SNAPSHOT.jar:?] at org.bukkit.craftbukkit.CraftServer.enablePlugin(CraftServer.java:669) ~[purpur-1.21.4.jar:1.21.4-2376-4bf1b98] at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:618) ~[purpur-1.21.4.jar:1.21.4-2376-4bf1b98] at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:772) ~[purpur-1.21.4.jar:1.21.4-2376-4bf1b98] at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:534) ~[purpur-1.21.4.jar:1.21.4-2376-4bf1b98] at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:369) ~[purpur-1.21.4.jar:1.21.4-2376-4bf1b98] at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1251) ~[purpur-1.21.4.jar:1.21.4-2376-4bf1b98] at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:344) ~[purpur-1.21.4.jar:1.21.4-2376-4bf1b98] at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?] Caused by: java.lang.ClassNotFoundException: com.comphenix.protocol.events.PacketAdapter at io.papermc.paper.plugin.entrypoint.classloader.PaperPluginClassLoader.loadClass(PaperPluginClassLoader.java:146) ~[purpur-1.21.4.jar:1.21.4-2376-4bf1b98] at io.papermc.paper.plugin.entrypoint.classloader.PaperPluginClassLoader.loadClass(PaperPluginClassLoader.java:107) ~[purpur-1.21.4.jar:1.21.4-2376-4bf1b98] at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526) ~[?:?] ... 21 more
API method(s) used
PacketAdapter
Expected behavior
My plugin sees ProtocolLib and its classes resulting in it not failing to enable the plugin
Code
https://github.com/Kai-Denzel-Jane/ClientInfo
The text was updated successfully, but these errors were encountered: