Solved Assistance with plugin.yml errors

Discussion in 'Spigot Plugin Development' started by SteveRaft, Feb 1, 2020.

  1. Hello! To start this thread off I will inform you all about the problem.

    My problem is that my plugin.yml is creating the same error each time after attempting to fix this. I have spellchecked it all and do not see any visual errors. I am a beginner with Java.

    Stacktrace:
    Code (Text):

    [18:26:40 ERROR]: Could not load 'plugins\ServerMix.jar' in folder 'plugins'
    org.bukkit.plugin.InvalidDescriptionException: Invalid plugin.yml
        at org.bukkit.plugin.java.JavaPluginLoader.getPluginDescription(JavaPluginLoader.java:160) ~[spigot-1.15.2.jar:git-Spigot-800b93f-8160e29]
        at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:138) [spigot-1.15.2.jar:git-Spigot-800b93f-8160e29]
        at org.bukkit.craftbukkit.v1_15_R1.CraftServer.loadPlugins(CraftServer.java:351) [spigot-1.15.2.jar:git-Spigot-800b93f-8160e29]
        at net.minecraft.server.v1_15_R1.DedicatedServer.init(DedicatedServer.java:203) [spigot-1.15.2.jar:git-Spigot-800b93f-8160e29]
        at net.minecraft.server.v1_15_R1.MinecraftServer.run(MinecraftServer.java:784) [spigot-1.15.2.jar:git-Spigot-800b93f-8160e29]
        at java.lang.Thread.run(Unknown Source) [?:1.8.0_231]
    Caused by: java.io.FileNotFoundException: Jar does not contain plugin.yml
        ... 6 more
     
    Plugin.yml:
    Code (Text):

    main: me.steveraft.servermix.Main
    name: ServerMix
    version: 1.0
    author: SteveRaft
    commands:
      Nick:
     
    Image of files in the plugin:
    [​IMG]
    [​IMG] (https://imgur.com/a/BAZcVjE)
    (Sorry if this is just another beginner mistake)

    If anybody knows the reason, please hint me towards the solution, but don't spoon-feed me, as I want to learn on my own.
     
  2. You need a plugin description:

    Code (Text):

    org.bukkit.plugin.InvalidDescriptionException: Invalid plugin.yml
        at org.bukkit.plugin.java.JavaPluginLoader.getPluginDescription
     
    Try that, if it doesn't work, I'm sorry, but I cant help
     
  3. Looks like you're not including the plugin.yml in your jar creation: Caused by: java.io.FileNotFoundException: Jar does not contain plugin.yml Make sure you include it when you build you jar!
     
  4. EDIT: Thank you for the help! I believe this and a few other solutions helped me!