Solved Problem with plugin.yml

Discussion in 'Spigot Plugin Development' started by DorianYTB, Jan 10, 2020.

  1. Hello i'm french !
    I have an error when I launch my plugin :

    Error :

    Code (Text):
    [14:10:41 ERROR]: Could not load 'plugins\plugintest.jar' in folder 'plugins'
    org.bukkit.plugin.InvalidDescriptionException: Invalid plugin.yml
            at ~[spigot.jar:git-Spigot-dcd1643-e60fc34]
            at org.bukkit.plugin.SimplePluginManager.loadPlugins( [spigot.jar:git-Spigot-dcd1643-e60fc34]
            at org.bukkit.craftbukkit.v1_12_R1.CraftServer.loadPlugins( [spigot.jar:git-Spigot-dcd1643-e60fc34]
            at org.bukkit.craftbukkit.v1_12_R1.CraftServer.reload( [spigot.jar:git-Spigot-dcd1643-e60fc34]
            at org.bukkit.Bukkit.reload( [spigot.jar:git-Spigot-dcd1643-e60fc34]
            at org.bukkit.command.defaults.ReloadCommand.execute( [spigot.jar:git-Spigot-dcd1643-e60fc34]
            at org.bukkit.command.SimpleCommandMap.dispatch( [spigot.jar:git-Spigot-dcd1643-e60fc34]
            at org.bukkit.craftbukkit.v1_12_R1.CraftServer.dispatchCommand( [spigot.jar:git-Spigot-dcd1643-e60fc34]
            at org.bukkit.craftbukkit.v1_12_R1.CraftServer.dispatchServerCommand( [spigot.jar:git-Spigot-dcd1643-e60fc34]
            at net.minecraft.server.v1_12_R1.DedicatedServer.aP( [spigot.jar:git-Spigot-dcd1643-e60fc34]
            at net.minecraft.server.v1_12_R1.DedicatedServer.D( [spigot.jar:git-Spigot-dcd1643-e60fc34]
            at net.minecraft.server.v1_12_R1.MinecraftServer.C( [spigot.jar:git-Spigot-dcd1643-e60fc34]
            at [spigot.jar:git-Spigot-dcd1643-e60fc34]
            at Source) [?:1.8.0_231]
    Caused by: Jar does not contain plugin.yml
            ... 14 more

    My plugin.yml :

    Code (YAML):
    main: fr.dodo.plugin.Main
    : Test
    : 1.0.0
    : Dodo
    : Test


    My :

    Code (Java):
    package fr.dodo.plugin;


    public class Main extends JavaPlugin{
        public void onEnable() {
            System.out.println("Le plugin de Test est LancĂ© !");
        public void onDisable() {
            System.out.println("Le plugin c'est arretĂ©");


  2. Your exported jar doesn't contain your plugin.yml.
    Make sure this is getting included when exporting.
  3. How i can do that ?
  4. You must've put it in a wrong folder, try puttin it in the src folder or outside of src.
  5. when you are exporting the jar to the server, you should see a list of files that will be exported with the jar, make sure that the plugin.yml is in there

    Also, where do you place the plugin.yml in the jar?
  6. I place the plguin.yml in src folder in package fr.dodo.plugin
  7. Should be plugin.yml

    If none of above works.
    Please tell if you're using maven. If Yes. Then post your pom.xml here too
  8. yes it is plugin.yml
  9. You need to place it outside of the src folder, so when you open the jar, you see src folder and plugin.yml
  10. yes thanks
    • Like Like x 1