Solved Invalid plugin.yml

Discussion in 'Plugin Development' started by AcePilot10, Feb 5, 2015.

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

    AcePilot10

    Hi, Iv'e made a plugin so that you can save the armor your wearing and save it so that you can then put it back on with a command. I keep getting an error in the console, and have been trying to figure it out all day. If anyone could try to figure out whats wrong that would be great.
    Here's my plugin.yml
    Code:
    main: me.AcePilot10.AceArmorSave
    name: ArmorSave
    version: 1.0
    commands:
      getsavedarmor:
        description: Sets your saved armor
      savearmor:
        description: Saves your current armor
    and here's my console error
    Code:
    [16:23:29 ERROR]: Could not load 'plugins\AceSaveArmor.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-20-g0b2ed13-b3108jnks
    Thanks so much for any help!
     
  2. Online

    timtower Administrator Administrator Moderator

    Moved to plugin development.
    @AcePilot10 Could you post the full error?
     
  3. Offline

    Laxer21117

    Are you sure you put your main class into the plugin.yml because I don't see anything else that could be causing this issue.
     
  4. Offline

    FameForAim

    do you use tabs in the plugin.yml ?? if you do delete them, they causing issues
     
  5. Offline

    AcePilot10

    Code:
    C:\Users\Cody\Desktop\Minecraft stuffs\Bukkit Server>java -Xmx1024M -jar craftbu
    kkit.jar -o true
    Loading libraries, please wait...
    [19:03:38 INFO]: Starting minecraft server version 1.7.10
    [19:03:38 INFO]: Loading properties
    [19:03:38 INFO]: Default game type: CREATIVE
    [19:03:38 INFO]: Generating keypair
    [19:03:39 INFO]: Starting Minecraft server on *:25565
    [19:03:39 INFO]: This server is running CraftBukkit version git-Bukkit-1.7.9-R0.
    2-20-g0b2ed13-b3108jnks (MC: 1.7.10) (Implementing API version 1.7.10-R0.1-SNAPS
    HOT)
    [19:03:39 ERROR]: Could not load 'plugins\AceSaveArmor.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-20-g0b2ed13-b3108jnks
    ]
            at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager
    .java:133) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at org.bukkit.craftbukkit.v1_7_R4.CraftServer.loadPlugins(CraftServer.ja
    va:364) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at org.bukkit.craftbukkit.v1_7_R4.CraftServer.<init>(CraftServer.java:32
    6) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at net.minecraft.server.v1_7_R4.PlayerList.<init>(PlayerList.java:68) [c
    raftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at net.minecraft.server.v1_7_R4.DedicatedPlayerList.<init>(SourceFile:14
    ) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at net.minecraft.server.v1_7_R4.DedicatedServer.init(DedicatedServer.jav
    a:133) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at net.minecraft.server.v1_7_R4.MinecraftServer.run(MinecraftServer.java
    :436) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at net.minecraft.server.v1_7_R4.ThreadServerApplication.run(SourceFile:6
    28) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
    Caused by: java.io.FileNotFoundException: Jar does not contain plugin.yml
            ... 9 more
    [19:03:39 INFO]: [AceAntiSwear] Loading AceAntiSwear v1.0
    [19:03:39 WARN]: Failed to load white-list:
    net.minecraft.util.com.google.gson.JsonSyntaxException: net.minecraft.util.com.g
    oogle.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to acc
    ept malformed JSON at line 2 column 2
            at net.minecraft.util.com.google.gson.Gson.assertFullConsumption(Gson.ja
    va:779) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at net.minecraft.util.com.google.gson.Gson.fromJson(Gson.java:769) ~[cra
    ftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at net.minecraft.server.v1_7_R4.JsonList.load(JsonList.java:148) ~[craft
    bukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at net.minecraft.server.v1_7_R4.DedicatedPlayerList.B(SourceFile:123) [c
    raftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at net.minecraft.server.v1_7_R4.DedicatedPlayerList.<init>(SourceFile:30
    ) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at net.minecraft.server.v1_7_R4.DedicatedServer.init(DedicatedServer.jav
    a:133) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at net.minecraft.server.v1_7_R4.MinecraftServer.run(MinecraftServer.java
    :436) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at net.minecraft.server.v1_7_R4.ThreadServerApplication.run(SourceFile:6
    28) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
    Caused by: net.minecraft.util.com.google.gson.stream.MalformedJsonException: Use
    JsonReader.setLenient(true) to accept malformed JSON at line 2 column 2
            at net.minecraft.util.com.google.gson.stream.JsonReader.syntaxError(Json
    Reader.java:1505) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
    
            at net.minecraft.util.com.google.gson.stream.JsonReader.checkLenient(Jso
    nReader.java:1386) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks
    ]
            at net.minecraft.util.com.google.gson.stream.JsonReader.doPeek(JsonReade
    r.java:531) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at net.minecraft.util.com.google.gson.stream.JsonReader.peek(JsonReader.
    java:414) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            at net.minecraft.util.com.google.gson.Gson.assertFullConsumption(Gson.ja
    va:775) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-20-g0b2ed13-b3108jnks]
            ... 7 more
    [19:03:39 INFO]: Preparing level "world"
    [19:03:39 INFO]: Preparing start region for level 0 (Seed: 4814793408543894102)
    [19:03:39 WARN]: Could not get information about this CraftBukkit version; perha
    ps you are running a custom one?: IOException
    [19:03:39 WARN]: Could not get latest artifact information: IOException
    [19:03:40 INFO]: Preparing spawn area: 85%
    [19:03:40 INFO]: Preparing start region for level 1 (Seed: -7466572603548790881)
    
    [19:03:41 INFO]: Preparing start region for level 2 (Seed: -7466572603548790881)
    
    [19:03:41 INFO]: [AceAntiSwear] Enabling AceAntiSwear v1.0
    [19:03:41 INFO]: Server permissions file permissions.yml is empty, ignoring it
    [19:03:41 INFO]: Done (2.352s)! For help, type "help" or "?"
    >
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
     
  6. Offline

    JasonT148796

    @AcePilot10
    What is the project name? It should be written like
    [project name].[main class]
    For example
    me.JasonT148796.hats.hat
    me.JasonT148796.hats - project
    hat - main method

    Try this:
    if that doesn't work add a .ArmorSave to main.

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

    AcePilot10

    Still getting the same error :/ also I do have my main class in yml (me.AcePilot10.ArmorSave.Main) but it got cut off when I copied it.
    All I have in my main class is an onEnable and onDisable method. Would it help if I posted the code of my other 2 classes (ArmorManager, commands)
     
  8. Offline

    teej107

    Code:
    Caused by: java.io.FileNotFoundException: Jar does not contain plugin.yml
     
  9. Offline

    AcePilot10

    @teej107 Why would the jar not contain the yml this problem is happening to all my projects. Even the ones Iv'e tested before.
     
  10. Offline

    teej107

    Because you don't package the plugin.yml file in when you generate the jar. Or the yml is in the wrong place inside the jar.
     
  11. Offline

    ZP18

    The plugin.yml should be in the root of the src folder, not in any packages
    Plugin layout:

    Code:
    Plugin:
      src:
        name.package.plugin:
          main.class
        plugin.yml
    if that makes sense to you
     
  12. Offline

    xTrollxDudex

    It would help to see your directory structure of an uncompressed jar.
     
  13. Offline

    AcePilot10

    Thanks so much for the help!!! With all your responses I found out that when I made my plugin.yml I made it inside the package not the jar itself. Once again thanks for all the responses!!
     
  14. Offline

    ZP18

    No worries! Please mark this thread as [SOLVED], by going into thread tools
     
  15. Thread tools > Edit thread > Prefix > Solved.
     
Thread Status:
Not open for further replies.

Share This Page