Solved InvalidDescriptionException

Discussion in 'Spigot Plugin Development' started by Exellanix, Jun 15, 2016.

  1. I am getting an InvalidDescriptionException error in my plugin. My plugin was fine before I made some changes. I did not edit the plugin.yml at all since. I do not know what is wrong, if I could get some help, that would be great.

    Error:

    Code (Text):
    [22:15:29 ERROR]: Could not load 'plugins/AdvancedStats.jar' in folder 'plugins'
    org.bukkit.plugin.InvalidDescriptionException: Invalid plugin.yml
            at org.bukkit.plugin.java.JavaPluginLoader.getPluginDescription(JavaPlug
    inLoader.java:154) ~[spigot-1.8.8.jar:git-Spigot-fdc1440-53fac9f]
            at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager
    .java:133) [spigot-1.8.8.jar:git-Spigot-fdc1440-53fac9f]
            at org.bukkit.craftbukkit.v1_8_R3.CraftServer.loadPlugins(CraftServer.ja
    va:292) [spigot-1.8.8.jar:git-Spigot-fdc1440-53fac9f]
            at net.minecraft.server.v1_8_R3.DedicatedServer.init(DedicatedServer.jav
    a:198) [spigot-1.8.8.jar:git-Spigot-fdc1440-53fac9f]
            at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java
    :524) [spigot-1.8.8.jar:git-Spigot-fdc1440-53fac9f]
            at java.lang.Thread.run(Unknown Source) [?:1.8.0_66]
    Caused by: java.io.FileNotFoundException: Jar does not contain plugin.yml
            ... 6 more
     
    plugin.yml:

    Code (Text):
    name: AdvancedStats
    main: io.github.exellanix.advancedstats.AdvancedStats
    description: The stats plugin for ExellPvP
    version: 4.0.1
    depend: [KitPvP]
    commands:
      stats:
        description: See you or another players stats!
        usage: /<command>
        aliases: [s, stat]
     
  2. I believe this is an issue with compiling, I had a similar issue recently, try looking around your build settings and make sure your jar includes all the necessary files.
     
  3. Make sure your plugin.yml is properly placed and is being exported inside the jar
     
  4. Code (Text):

    Caused by: java.io.FileNotFoundException: Jar does not contain plugin.yml
     
    Seems your jar didn't compile properly. Refresh your project and compile again.

    EDIT:
    Ninja'd by nextinfinity xD
     
    • Like Like x 1
  5. Make sure your plugin.yml is in the "src" folder. If it's not it won't be compiled in the .jar.
     
  6. My plugin.yml is in the src folder. I refreshed the project and I am still getting the error.

    Here is a screenshot of my project:

    upload_2016-6-15_17-17-32.png
     
  7. Maybe this is an IDE specific thing, but at least in Eclipse, files are placed outside of the src folder (they are still marked to be put in the jar in export settings). It may be worth moving it outside and seeing if it will register properly.

    EDIT: A screenshot. Note that source folders are closed but the files are still shown - http://i.imgur.com/4KTcyLc.png
     
  8. I did that and it is still throwing the exception.
     
  9. If you open up the jar (WinRAR or something), is the plugin.yml inside the jar?
     
  10. It is not in there for some reason.
     
  11. Make sure your export settings include the plugin.yml, usually you can choose specific files to be included.

    Here is a setup of a recent project:

    [​IMG]
     
  12. Okay I figured it out. I didn't have the plugin.yml in my compile settings, so it never was in the file. Thanks Apthos.
     
  13. I literally just said that and didn't get a thanks. So darude! xD
     
  14. Lol sorry, I didnt really look, plus, he was the first one. Thank you SwiftLee!