org.bukkit.plugin.InvalidDescriptionException: Invalid plugin.yml

Discussion in 'Plugin Development' started by Plazmotech, May 22, 2012.

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

    Plazmotech

    Hey! I'm making a plugin, and when I compile it, I get org.bukkit.plugin.InvalidDescriptionException: Invalid plugin.yml. Code:

    Error:
    Code:
    19:35:36 [SEVERE] Could not load 'plugins/HelloWorldPlugin.jar' in folder 'plugins'
    org.bukkit.plugin.InvalidDescriptionException: Invalid plugin.yml
        at org.bukkit.plugin.java.JavaPluginLoader.getPluginDescription(JavaPluginLoader.java:193)
        at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:132)
        at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:213)
        at org.bukkit.craftbukkit.CraftServer.reload(CraftServer.java:550)
        at org.bukkit.Bukkit.reload(Bukkit.java:182)
        at org.bukkit.command.defaults.ReloadCommand.execute(ReloadCommand.java:22)
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:166)
        at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:479)
        at org.bukkit.craftbukkit.CraftServer.dispatchServerCommand(CraftServer.java:475)
        at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:603)
        at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:572)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:450)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:492)
    Caused by: java.io.FileNotFoundException: Jar does not contain plugin.yml
        ... 13 more
    
    Plugin.yml:


    Code:
    name: HelloWorldPlugin
    main: com.enjin.playsoulcraftmc.plazmotech.java.Main
    version: 0.1
    Main.java


    Code:
    //
    //  Project: PlazmoPluginMadness
    //  Class: Main.java
    // 
    //
    //  Created by Thor Correia, Plazmotech on 5/22/12.
    //  Copyright 2012 Plazmotech Co. All rights reserved.
    //
     
    package com.enjin.playsoulcraftmc.plazmotech.java;
     
    import java.util.logging.Logger;
    import org.bukkit.plugin.java.JavaPlugin;
     
    public class Main extends JavaPlugin{
     
    public static Main plugin;
    public final Logger logger = Logger.getLogger("Minecraft");
     
    @Override
    public void onDisable() {
    this.logger.info("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
    this.logger.info("HelloWorldPlugin is now disabled!");
    this.logger.info("Copyright 2012 Plazmotech Co. All rights reserved.");
    this.logger.info("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
    }
     
    @Override
    public void onEnable() {
    this.logger.info("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
    //this.logger.info(pdfFile.getName() + "is now enabled. ");
    this.logger.info("HelloWorldPlugin is now disabled!");
    this.logger.info("Copyright 2012 Plazmotech Co. All rights reserved.");
    this.logger.info("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
    }
    }
    


    Compiling steps:
    1) I right clicked the project, and hit export
    2) Clicked JAR file
    3) Named it and hit finish

    Help!
    Note: I am using eclipse

    EDIT-Edited code for elegance
     
  2. Offline

    nighteyes604

    Plazmotech

    When you make your jar make sure you check the box to include the plugin.yml in the jar. It looks like your plugin.yml is not being included.
     
  3. Offline

    SirTyler

    Also make sure your plugin.yml is OUTSIDE the source folder.
     
    hawkfalcon likes this.
  4. Offline

    Plazmotech

    It is being included.
     
  5. Offline

    r0306

    Plazmotech
    I think you should check what SirTyler said:
     
  6. Caused by: java.io.FileNotFoundException: Jar does not contain plugin.yml

    I think its not, send us the jar so we can verify it
     
  7. Offline

    wxwsk8er

    Caused by: org.yaml.snakeyaml.scanner.ScannerException: null; mapping values are not allowed here
    How do I fix this?
     
  8. Offline

    Anrza

    I've got the same problem, help someone?
     
  9. Offline

    fireblast709

  10. Offline

    Anrza


    Very cool website, much thanks and gratitude.
    However, it seems like my cause evolved to:
    org.bukkit.plugin.InvalidDescriptionException: commands are of wrong type
     
  11. Offline

    fireblast709

    Anrza Updated YAML please :3
     
  12. Offline

    Anrza

    fireblast709 like making it right, saving it and exporting all of it again?
    Did that...
     
  13. Offline

    fireblast709

    Anrza no I mean post it here so I can see what you changed
     
  14. Offline

    Anrza

    fireblast709
    Code:
    name: Test
    version: 1.0
    main: me.Anrza.test.Test
    author: Anrza
    description: Test
     
    commands:
      test:
        /<command>
      description: It's a test
    That's what it looks like.
     
  15. Offline

    fireblast709

    Anrza It was a spacing error after all :p
    Code:
    name: Test
    version: 1.0
    main: me.Anrza.test.Test
    author: Anrza
    description: Test
     
    commands:
      test:
        usage: /<command>
        description: It's a test
    Compare them and make sure you understand the actual difference (aside the extra spaces, more in terms of how this influences the YAML parsing)
     
  16. Offline

    Anrza


    Oh, derp, failed there.
    Now we shall see if it works...
    You, Sir, are very epic and cool and worthy of love and gratitude!
    It works now! Thank you! :D
     
Thread Status:
Not open for further replies.

Share This Page