Invalid plugin.yml

Discussion in 'Plugin Development' started by Zekeplayzz, Jun 26, 2018.

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

    Zekeplayzz

    Okay, so I am taking a course, I followed the guys instructions EXACTLY, and I get an error message saying i have an invalid plugin.yml. Please help? Heres my plugin.yml:

    Code:
    version: 1.0
    name: Superparks
    main: com.Zekeplayzz.java.Main
    author: Zekeplayzz
    description: Just a test.
    And heres my code:

    Code:
    package com.Zekeplayzz.java;
    
    
    
    import org.bukkit.plugin.java.JavaPlugin;
    
    
    
    public class Main extends JavaPlugin{
    
    
    
      @Override
    
      public void onEnable() {
    
          System.out.println("My first plugin is working!");
    
      }
    
      
    
      @Override
    
      public void onDisable() {
    
          
    
            
    
          }
    
    }
     
    Last edited by a moderator: Jun 26, 2018
  2. Online

    timtower Moderator Moderator

  3. Offline

    Zekeplayzz

    Okay when I run the server heres the error message:

    [09:21:02 ERROR]: Could not load 'plugins/Superparks.jar' in folder 'plugins'

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

    at org.bukkit.plugin.java.JavaPluginLoader.getPluginDescription(JavaPluginLoader.java:150) ~[craftbukkit.jar:git-Bukkit-809c399]

    at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:133) [craftbukkit.jar:git-Bukkit-809c399]

    at org.bukkit.craftbukkit.v1_12_R1.CraftServer.loadPlugins(CraftServer.java:304) [craftbukkit.jar:git-Bukkit-809c399]

    at net.minecraft.server.v1_12_R1.DedicatedServer.init(DedicatedServer.java:188) [craftbukkit.jar:git-Bukkit-809c399]

    at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:522) [craftbukkit.jar:git-Bukkit-809c399]

    at java.lang.Thread.run(Thread.java:844) [?:?]

    Caused by: java.io.FileNotFoundException: Jar does not contain plugin.yml
     
  4. Online

    timtower Moderator Moderator

  5. Are you using IntelliJ? This happens as it is different to eclipse, in that you have to put the plugin.yml in src rather than the project name.
     
  6. Offline

    KarimAKL

    @NullPointerExptn I'm using Eclipse and i'm putting it in the src folder and my plugins work without any errors?
     
  7. Offline

    Zekeplayzz

    Ok im exporting the plugin.yml, it says select the rescources to export and .classpath, .project, and plugin.yml are ticked off

    I'm not sure what IntelliJ is.

    Man, if i can't sole this problemo i cannot make any of the plugins i had such good ideas for why does this happen every time i make a plugin? I have been trying for a few months now and I still haven't gotten a SINGLE plugin working.
     
    Last edited: Jul 7, 2018
  8. Yeah that's what I'm saying. On IntelliJ, it is different to Eclipse as you have to specifically put in the src folder, whereas on Eclipse, you put it in the project and it places it in ther right place by default.

    IntelliJ is an IDE, so if you don't know it I assume you aren't using it. I can't offer any more help as this is the only explaination to this error I can think of. Sorry.
     
  9. Offline

    KarimAKL

    @NullPointerExptn Oh, i didn't know that because i just put it in the src folder myself. :p Thank you for the information tho. :)
     
Thread Status:
Not open for further replies.

Share This Page