1.17.x Library problems

Discussion in 'Spigot Plugin Development' started by LeonTheDev, Jun 16, 2021.

  1. Every single library I try to import JAR or Maven I get this error every time I try and call a method from an external library:

    Code (Text):
    Caused by: java.lang.ClassNotFoundException: com.algorithmia.APIException
            at org.bukkit.plugin.java.PluginClassLoader.loadClass0(PluginClassLoader.java:142) ~[spigot-1.17.jar:3141-Spigot-66f9d3c-72a2901]
            at org.bukkit.plugin.java.PluginClassLoader.loadClass(PluginClassLoader.java:99) ~[spigot-1.17.jar:3141-Spigot-66f9d3c-72a2901]
            at java.lang.ClassLoader.loadClass(ClassLoader.java:519) ~[?:?]
            ... 11 more
  2. try adding <scope>compile</scope> in your dependency.
  3. compile if the jar isn't a plugin or just a library. add the api on plugin.yml's dependency if it is a plugin.
  4. Hey, is your library a plugin api or a api that should be shaded. If it's a plugin api, try to add to your plugin yml depend or softdepend and it's plugin api name. If it's shading, try to add the scope compile and use the copy dependency plugin for maven.