Solved Plugin.yml error :l

Discussion in 'Plugin Development' started by Tabbin, Nov 1, 2014.

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

    Tabbin

    this is my plugin.yml:

    Code:
    name: FirstPlugin
    main: com.oliversmith7.bukkit.FirstPlugin
    version: 0.0.1
    and this is the error in console:
    Code:
    [20:56:45 ERROR]: Could not load 'plugins\FirstPlugin.jar' in folder 'plugins'
    org.bukkit.plugin.InvalidDescriptionException: Invalid plugin.yml
            at org.bukkit.plugin.java.JavaPluginLoader.getPluginDescription(JavaPlug
    inLoader.java:150) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-16-g37c7969-b3105jnks
    ]
            at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager
    .java:133) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-16-g37c7969-b3105jnks]
            at org.bukkit.craftbukkit.v1_7_R4.CraftServer.loadPlugins(CraftServer.ja
    va:364) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-16-g37c7969-b3105jnks]
            at org.bukkit.craftbukkit.v1_7_R4.CraftServer.<init>(CraftServer.java:32
    6) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-16-g37c7969-b3105jnks]
            at net.minecraft.server.v1_7_R4.PlayerList.<init>(PlayerList.java:68) [c
    raftbukkit.jar:git-Bukkit-1.7.9-R0.2-16-g37c7969-b3105jnks]
            at net.minecraft.server.v1_7_R4.DedicatedPlayerList.<init>(SourceFile:14
    ) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-16-g37c7969-b3105jnks]
            at net.minecraft.server.v1_7_R4.DedicatedServer.init(DedicatedServer.jav
    a:133) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-16-g37c7969-b3105jnks]
            at net.minecraft.server.v1_7_R4.MinecraftServer.run(MinecraftServer.java
    :436) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-16-g37c7969-b3105jnks]
            at net.minecraft.server.v1_7_R4.ThreadServerApplication.run(SourceFile:6
    28) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-16-g37c7969-b3105jnks]
    Caused by: java.io.FileNotFoundException: Jar does not contain plugin.yml
            ... 9 more

    and my main code is:

    Code:
    [20:56:45 ERROR]: package com.oliversmith7.bukkit;
     
    import org.bukkit.plugin.java.JavaPlugin;
     
     
     
    public class FirstPlugin extends JavaPlugin {
     
     
    @Override
    public void onEnable(){
             getLogger().info("onEnable has started!");
    }
     
        @Override
        public void onDisable(){
       getLogger().info("onDisable has started!");
       
        }
        }

    Im starting out, this is my first error i've encountered.
     
  2. Offline

    teej107

    Tabbin Make sure that there are no Tabs in your yml.
     
  3. Are you sure that you marked the plugin.yml file as "should pack" in eclipse inside the Export window?
    Sometimes when you edit a yml included in the plugin eclipse will show a pop up saying "Resource xxx.yml out of sync." and it will not pack that file because it unmarked the checkbox.

    I don't think thats the issue because the stacktrace says "Caused by: java.io.FileNotFoundException: Jar does not contain plugin.yml"

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 14, 2016
  4. Offline

    Tabbin

    [​IMG]II dont quite understand? this is what i've got.

    When i export it i check them all :l?
     
  5. Offline

    teej107

    Ah yeah. Totally missed that.

    Tabbin Put it in your project folder, NOT your src folder.
     
  6. Offline

    Tabbin



    Thanks man! <3
     
Thread Status:
Not open for further replies.

Share This Page