Invalid Plugin.yml

Discussion in 'Spigot Plugin Development' started by Jake_, Apr 14, 2017.

  1. Help?

    Code (Text):

    name: Galaxy
    main: com.galaxy.io.Core
    version: 2.7
    author: Jake_
    commands:
        settabname:
            description: Sets your tab name.
        resettabname:
            description: Resets your tab name.
        alert:
            description: Creates a chat alert.
        destroy:
            description: Removes user from admin list and bans them (Freedom Only).
        buildinfo:
            description: Displays build information.
     
  2. commands require a 'usage: ' tab:


    Code (Text):

    name: Galaxy
    main: com.galaxy.io.Core
    version: 2.7
    author: Jake_
    commands:
        settabname:
            description: Sets your tab name.
            usage: /<command>
        resettabname:
            description: Resets your tab name.
            usage: /<command>
        alert:
            description: Creates a chat alert.
            usage: /<command>
        destroy:
            description: Removes user from admin list and bans them (Freedom Only).
            usage: /<command>
        buildinfo:
            description: Displays build information.
            usage: /<command>
     
  3.  
  4. Could you show the error that appears in console?
     
  5. org.bukkit.plugin.InvalidDescriptionException: Invalid plugin.yml
    at org.bukkit.plugin.java.JavaPluginLoader.getPluginDescription(JavaPluginLoader.java:152) ~[Spigot.jar:git-Spigot-54ec0b8-1ac133e]
    at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:133) [Spigot.jar:git-Spigot-54ec0b8-1ac133e]
    at org.bukkit.craftbukkit.v1_11_R1.CraftServer.loadPlugins(CraftServer.java:301) [Spigot.jar:git-Spigot-54ec0b8-1ac133e]
    at net.minecraft.server.v1_11_R1.DedicatedServer.init(DedicatedServer.java:204) [Spigot.jar:git-Spigot-54ec0b8-1ac133e]
    at net.minecraft.server.v1_11_R1.MinecraftServer.run(MinecraftServer.java:544) [Spigot.jar:git-Spigot-54ec0b8-1ac133e]
    at java.lang.Thread.run(Unknown Source) [?:1.8.0_121]
    Caused by: java.io.FileNotFoundException: Jar does not contain plugin.yml
     
  6. 'FileNotFoundException'
    is it named plugin.yml (no caps), and located in the src folder?
     
  7. hm... thats really weird
     
  8. Does it look something like this?
    Schermafbeelding 2017-04-14 om 10.30.19.png
     
  9. put it in you actual project folder or if your using maven (which you are not) put it in src/main/resources
     
  10. And also include plugin.yml when exporting
     
  11. so in the example I showed, it should be put in "com.webmets.pexprefix.resources.plugin.yml"?
     
  12. Actually I am using maven, so I suggest you fuck off
     
    • Friendly Friendly x 2
    • Funny Funny x 1
  13. The plugin.yml needs a description of the plugin.
    Just add
    description: a plugin for blahhh
     
  14. No, you select your plugin.yml, press CTRL + X, select your project folder (which is in this case PEXPrefix) and then press CTRL + V
     
  15. Make sure to add something like this in your pom.xml

    Code (Text):
    <resources>
                <resource>
                    <directory>src/main/resources</directory>
                    <!-- Keeping filtering at true here reduces plugin.yml redundancy! -->
                    <filtering>true</filtering>
                    <includes>
                        <include>plugin.yml</include>
                    </includes>
                </resource>
                <resource>
                    <directory>src/main/resources</directory>
                    <!-- Keep filtering at false for other resources to prevent bad magic -->
                    <filtering>false</filtering>
                    <excludes>
                        <exclude>**/*.java</exclude>
                        <exclude>plugin.yml</exclude>
                    </excludes>
                </resource>
            </resources>
     
  16. Put the file in <root folder, e.g. project name>/src/main/resources.
    why would that ever be a thing, if i may ask?
    he never specified he isn't nor if he is.
    if he uses maven he doesnt "export", he builds using maven.
    sorry what? they don't.
    [​IMG]
    it doesn't tho.
    [​IMG]
     
    • Informative Informative x 2
    • Like Like x 1
    • Funny Funny x 1
  17. It clearly says it all in the error message... The yml file is not found. wich means A: wrong directory B: wrong filename C: no included at export