Maximvdw / SpigotSite-API

Spigot Site API
24 stars 11 forks source link

ClassNotFoundException by onEnable #10

Open WeltensiedlerDE opened 5 years ago

WeltensiedlerDE commented 5 years ago

I'm trying this little test:

` new SpigotSiteCore();

    List<Resource> resources = null;

    ResourceManager resourceManager = SpigotSite.getAPI().getResourceManager();
    try {
        resources = resourceManager.getResourcesByUser(123456);
    } catch (ConnectionFailedException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }

    for(Resource plugin : resources) {
        Bukkit.getServer().getConsoleSender().sendMessage(plugin.getResourceName());
    }`

By putting this in onEnable() it throws me this Errors:

[15:41:01] [Server thread/ERROR]: Error occurred while enabling Test v0.0.1-SNAPSHOT (Is it up to date?) java.lang.NoClassDefFoundError: be/maximvdw/spigotsite/SpigotSiteCore at me.tomcatchriss.Test.Main.onEnable(Main.java:19) ~[?:?] at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:263) ~[Server.jar:git-Spigot-1eece4f-ee88184] at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:352) [Server.jar:git-Spigot-1eece4f-ee88184] at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:416) [Server.jar:git-Spigot-1eece4f-ee88184] at org.bukkit.craftbukkit.v1_14_R1.CraftServer.enablePlugin(CraftServer.java:458) [Server.jar:git-Spigot-1eece4f-ee88184] at org.bukkit.craftbukkit.v1_14_R1.CraftServer.enablePlugins(CraftServer.java:372) [Server.jar:git-Spigot-1eece4f-ee88184] at org.bukkit.craftbukkit.v1_14_R1.CraftServer.reload(CraftServer.java:805) [Server.jar:git-Spigot-1eece4f-ee88184] at org.bukkit.Bukkit.reload(Bukkit.java:576) [Server.jar:git-Spigot-1eece4f-ee88184] at org.bukkit.command.defaults.ReloadCommand.execute(ReloadCommand.java:27) [Server.jar:git-Spigot-1eece4f-ee88184] at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:149) [Server.jar:git-Spigot-1eece4f-ee88184] at org.bukkit.craftbukkit.v1_14_R1.CraftServer.dispatchCommand(CraftServer.java:707) [Server.jar:git-Spigot-1eece4f-ee88184] at org.bukkit.craftbukkit.v1_14_R1.CraftServer.dispatchServerCommand(CraftServer.java:692) [Server.jar:git-Spigot-1eece4f-ee88184] at net.minecraft.server.v1_14_R1.DedicatedServer.handleCommandQueue(DedicatedServer.java:433) [Server.jar:git-Spigot-1eece4f-ee88184] at net.minecraft.server.v1_14_R1.DedicatedServer.b(DedicatedServer.java:397) [Server.jar:git-Spigot-1eece4f-ee88184] at net.minecraft.server.v1_14_R1.MinecraftServer.a(MinecraftServer.java:956) [Server.jar:git-Spigot-1eece4f-ee88184] at net.minecraft.server.v1_14_R1.MinecraftServer.run(MinecraftServer.java:801) [Server.jar:git-Spigot-1eece4f-ee88184] at java.lang.Thread.run(Unknown Source) [?:1.8.0_211] Caused by: java.lang.ClassNotFoundException: be.maximvdw.spigotsite.SpigotSiteCore at java.net.URLClassLoader.findClass(Unknown Source) ~[?:1.8.0_211] at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:135) ~[Server.jar:git-Spigot-1eece4f-ee88184] at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:81) ~[Server.jar:git-Spigot-1eece4f-ee88184] at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_211] at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_211] ... 17 more