Solved I need help!

Discussion in 'Plugin Development' started by technerder, Aug 22, 2016.

Thread Status:
Not open for further replies.
  1. Offline


    i finally finished my plugin however at the end of compilation:

    a- it gives me an error: this was exported with errors
    b- when i put it in my plugins folder to test it, it says:
    [12:06:55 ERROR]: Could not load 'plugins\EnderChest.jar' in folder 'plugins'
    org.bukkit.plugin.InvalidPluginException: Cannot find main class `technerder.shadowtech.echest'
            at<init>( ~[Server.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at ~[Server.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at org.bukkit.plugin.SimplePluginManager.loadPlugin( ~[Server.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at org.bukkit.plugin.SimplePluginManager.loadPlugins( [Server.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at org.bukkit.craftbukkit.v1_7_R4.CraftServer.loadPlugins( [Server.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at org.bukkit.craftbukkit.v1_7_R4.CraftServer.<init>( [Server.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at net.minecraft.server.v1_7_R4.PlayerList.<init>( [Server.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at net.minecraft.server.v1_7_R4.DedicatedPlayerList.<init>(SourceFile:14) [Server.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at net.minecraft.server.v1_7_R4.DedicatedServer.init( [Server.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at [Server.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at [Server.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
    Caused by: java.lang.ClassNotFoundException: technerder.shadowtech.echest
            at Source) ~[?:1.8.0_101]
            at ~[Server.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at ~[Server.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_101]
            at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:1.8.0_101]
            at java.lang.Class.forName0(Native Method) ~[?:1.8.0_101]
            at java.lang.Class.forName(Unknown Source) ~[?:1.8.0_101]
            at<init>( ~[Server.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            ... 10 more
    can someone please tell me why this isn't working!?

    here is the whole thing
  2. Offline


    You probably didn't input the main class in your plugin.yml correctly, or at all. Can I see your plugin.yml?

    Also exporting with errors is never a good thing, if you know it's not functional you should always go ahead and comment them out instead of exporting with errors. It could lead to other problems.
  3. Offline


    name: EChest
    main: technerder.shadowtech.echest
    version: 1.0
          description: Opens The Players EnderChest!
          usage: /echest


    should i change the "technerder.shadowtech.echest" to main.class or main? (i have never had to do this before)
    Last edited: Aug 22, 2016
  4. Offline


    That means that there is an error in one of your classes. If you're using an IDE (like eclipse), then it should underline the lines that have an error on them. Fix the errors, and this should be fixed.

    It seems you are missing your main class from this path. (unless echest is your main class, in which-case it should start with an uppercase letter.) Make sure the path you provided is exactly the same as your package and classname.
  5. Offline


    there is one error at the bottom of the page, i added the image of my file path

    Attached Files:

  6. Offline


    EDIT: Forget everything I said, the reason why it's not loading is because you're missing a bracket in your main class. Add 1 more bracket at the end and re-export it and you should be good.

    Also in the plugin.yml make it technerder.shadowtech.echest.EChest

    Instead of just the package name @technerder
    Last edited: Aug 22, 2016
  7. Offline


    @SantaClawz69 so i change my package name to technerder.shadowtech.echest.mainclass ?
  8. Offline


    Yes, I made an edit of all the things you should do. After that re-export and you should be fine.
  9. Offline


    @SantaClawz69 however if i do add an extra bracket it will underline all of
    "public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {

    EDIT: Never mind its fixed now

    @SantaClawz69 thank you for your help!

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: Aug 22, 2016
  10. Offline


    No problem, please set this thread to solved so others don't get confused :)
Thread Status:
Not open for further replies.

Share This Page