Need help.. Plugin.yml not found error

Discussion in 'Plugin Development' started by Repasa, Feb 6, 2013.

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

    Repasa

    Hello i am new to the minecraft plugin coding but i know a bit of java through some experience and im having a problem...


    INFO [What it looks like on the left hand side]
    ==================
    Faction dominate
    ->SRC
    ->me.Repasa.Fd
    -> FactionD.Java
    JRE System Library...
    Referenced Library's..
    Plugin.yml
    ==================


    The error is this...
    Code:
     
    C:\Users\Dominick\Desktop\test server>java -Xms1024M -Xmx1024M -jar craftbukkit.
    jar -o true
    210 recipes
    27 achievements
    20:50:37 [INFO] Starting minecraft server version 1.4.7
    20:50:37 [INFO] Loading properties
    20:50:37 [INFO] Default game type: SURVIVAL
    20:50:37 [INFO] Generating keypair
    20:50:38 [INFO] Starting Minecraft server on *:25565
    20:50:38 [INFO] This server is running CraftBukkit version git-Bukkit-1.4.7-R1.0
    -b2624jnks (MC: 1.4.7) (Implementing API version 1.4.7-R1.0)
    20:50:38 [SEVERE] Could not load 'plugins\FactionD.jar' in folder 'plugins'
    org.bukkit.plugin.InvalidDescriptionException: Invalid plugin.yml
            at org.bukkit.plugin.java.JavaPluginLoader.getPluginDescription(JavaPlug
    inLoader.java:247)
            at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager
    .java:132)
            at org.bukkit.craftbukkit.v1_4_R1.CraftServer.loadPlugins(CraftServer.ja
    va:239)
            at org.bukkit.craftbukkit.v1_4_R1.CraftServer.<init>(CraftServer.java:21
    7)
            at net.minecraft.server.v1_4_R1.PlayerList.<init>(PlayerList.java:55)
            at net.minecraft.server.v1_4_R1.DedicatedPlayerList.<init>(SourceFile:11
    )
            at net.minecraft.server.v1_4_R1.DedicatedServer.init(DedicatedServer.jav
    a:104)
            at net.minecraft.server.v1_4_R1.MinecraftServer.run(MinecraftServer.java
    :399)
            at net.minecraft.server.v1_4_R1.ThreadServerApplication.run(SourceFile:8
    49)
    Caused by: java.io.FileNotFoundException: Jar does not contain plugin.yml
            ... 9 more
    20:50:38 [INFO] Preparing level "world"
    20:50:38 [INFO] Preparing start region for level 0 (Seed: -1489983076678041535)
    20:50:39 [INFO] Preparing start region for level 1 (Seed: -1489983076678041535)
    20:50:39 [INFO] Preparing spawn area: 61%
    20:50:39 [INFO] Preparing start region for level 2 (Seed: -1489983076678041535)
    20:50:39 [INFO] Server permissions file permissions.yml is empty, ignoring it
    20:50:39 [INFO] Done (1.376s)! For help, type "help" or "?"
    >
    this is my plugin code...
    Code:
    package me.Repasa.Fd;
     
    import java.util.logging.Logger;
     
    import org.bukkit.ChatColor;
    import org.bukkit.command.Command;
    import org.bukkit.command.CommandSender;
    import org.bukkit.entity.Player;
    import org.bukkit.plugin.PluginDescriptionFile;
    import org.bukkit.plugin.java.JavaPlugin;
     
    public class FactionD extends JavaPlugin{
        public final Logger logger = Logger.getLogger("Minecraft");
        public static FactionD plugin;
       
        @Override
        public void onDisable() {
            PluginDescriptionFile pdffile = this.getDescription();
            this.logger.info(pdffile.getName() + "Has Been Disabled!");
        }
       
        @Override
        public void onEnable() {
            PluginDescriptionFile pdffile = this.getDescription();
            this.logger.info(pdffile.getName() + "Version" + "Has Been Enabled!");
        }
        public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args){
            Player player = (Player) sender;
            if(cmd.getName().equalsIgnoreCase("capture")){ // If the player typed /capture then do the following...
                player.sendMessage(ChatColor.GOLD + "Capturing...");
                return true;
            } //If this has happened the function will return true.
                // If this hasn't happened the a value of false will be returned.
            return false;
        }
    }
    
    and my plugin.yml file...
    Code:
    name: Faction Dominate
    version: 0.1
    main: me.Repasa.Fd
    author: Repasa
    description: Test


    Please help me out
    Thanks in advance!
     
  2. Offline

    RealDope

    Don't have the capital P in plugin.yml, pretty sure that's your problem.
     
  3. Offline

    Repasa

    no thats not it
     
  4. Offline

    CubixCoders

    Caused by: java.io.FileNotFoundException: Jar does not contain plugin.yml
    Are you sure your plugin.yml is just like that? Not Plugin.yml, plugin.yml That has to be the error
     
  5. Offline

    Repasa

    that is not the problem either i have tried to change the letter case
     
  6. Offline

    evilmidget38

    Repasa Use something like 7-zip or winrar and open up the jar file to ensure that the created jar actually has a plugin.myl.
     
  7. Offline

    Repasa

    i open it up with winrar and this is whats in it
    ==================
    META-inf
    plugin.yml
    .classpath
    .project
    ==================

    i have also tried to do it with out exporting the .classpath and .project
     
  8. Offline

    triarry

    Your main is incorrect. It's {$MainClass}.{$MainJavaFile}

    In your case it would be me.Repasa.Fd.FactionD

    Since your package is incorrect, you may notice in your .jar (the file you opened with winrar),
    you are missing your me folder that should be above META-INF. It would go me >> Repasa >> Fd >> FactionD.java.
     
  9. Offline

    Repasa

    Thank you so much i cant believe thats all it took....
     
Thread Status:
Not open for further replies.

Share This Page