No Such Method Error when shading the plugin into my own plugin
See original GitHub issuejava.lang.NoSuchMethodError: org.bukkit.Server.getOnlinePlayers()[Lorg/bukkit/entity/Player;
at com.comphenix.tinyprotocol.TinyProtocol.registerPlayers(TinyProtocol.java:228) ~[?:?]
at com.comphenix.tinyprotocol.TinyProtocol.<init>(TinyProtocol.java:87) ~[?:?]
at net.jitse.npclib.listeners.PacketListener$2.<init>(PacketListener.java:61) ~[?:?]
at net.jitse.npclib.listeners.PacketListener.start(PacketListener.java:61) ~[?:?]
at net.jitse.npclib.NPCLib.registerInternal(NPCLib.java:67) ~[?:?]
at net.jitse.npclib.NPCLib.<init>(NPCLib.java:57) ~[?:?]
at com.mc_atlas.atlasmachinationsaddon.AtlasMachinationsAddon.onEnable(AtlasMachinationsAddon.java:44) ~[?:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:254) ~[patched_1.13.2.jar:git-Paper-436]
at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:325) ~[patched_1.13.2.jar:git-Paper-436]
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:405) ~[patched_1.13.2.jar:git-Paper-436]
at org.bukkit.craftbukkit.v1_13_R2.CraftServer.enablePlugin(CraftServer.java:438) ~[patched_1.13.2.jar:git-Paper-436]
at org.bukkit.craftbukkit.v1_13_R2.CraftServer.enablePlugins(CraftServer.java:352) ~[patched_1.13.2.jar:git-Paper-436]
at net.minecraft.server.v1_13_R2.MinecraftServer.l(MinecraftServer.java:613) ~[patched_1.13.2.jar:git-Paper-436]
at net.minecraft.server.v1_13_R2.MinecraftServer.a(MinecraftServer.java:575) ~[patched_1.13.2.jar:git-Paper-436]
at net.minecraft.server.v1_13_R2.MinecraftServer.a(MinecraftServer.java:435) ~[patched_1.13.2.jar:git-Paper-436]
at net.minecraft.server.v1_13_R2.DedicatedServer.init(DedicatedServer.java:316) ~[patched_1.13.2.jar:git-Paper-436]
at net.minecraft.server.v1_13_R2.MinecraftServer.run(MinecraftServer.java:791) ~[patched_1.13.2.jar:git-Paper-436]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_152]
Issue Analytics
- State:
- Created 5 years ago
- Comments:12 (5 by maintainers)
Top Results From Across the Web
java.lang.NoSuchMethodError but Method can be found within ...
It seems to me in Bukkit it cannot find code from my API, at all. If I call a method within the parent...
Read more >Why Spark Submit causes NoSuchMethodError when I run a ...
1 Answer 1 ... As mentioned by @Gregoire, The issue is due to the jar file which is in the Spark environment, as...
Read more >Resolving NoSuchMethodError (SCALA/JAVA) - Medium
This error is a runTime error which occurs as a result of missing method definition in the classes available in the ClassPath.
Read more >Plugin throwing NoSuchMethodError on RecipeExecutor.save ...
I want to create a plugin for Android Studio which adds a new project template. This template would be an Android project with...
Read more >NoSuchMethodError on jbossesb-4.8 - JBoss.org
I have a workaround for now: I used the Maven Shade plugin on infinispan-core/pom.xml to shade the org.jboss.logging package. Then I changed the ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
So, I should probably clarify. I was a bit of a noob and said “shade” when I didn’t actually shade the API into my own plugin. I added the plugin version of NPCLib as a dependency. I just shaded (actually this time) the API into my own plugin (I use Maven and I use IntelliJ) and now I’m getting another error:
EDIT: So it looks like I was adding in an extra step… I just had to compile the plugin during the package phase of Maven. Marked as resolved.
Fixed in release 1.4.2!