plugin.yml

Discussion in 'Plugin Development' started by rickjuhh, Oct 22, 2019.

  1. Offline

    rickjuhh

    1. Plugin.yml
    Code:
    main: me.rickmine2006chat.main
    name: Chat
    version: 1.0
    authors: rickmine2006
    description: >
      Dit is een chat plugin
    Error
    Code:
    [ERROR] Could not load 'plugins/Chats.jar' in folder 'plugins'
    
    org.bukkit.plugin.InvalidDescriptionException: Invalid plugin.yml
    
    at org.bukkit.plugin.java.JavaPluginLoader.getPluginDescription(JavaPluginLoader.java:154) ~[spigot-1.8.8.jar:git-Spigot-21fe707-e1ebe52]
    
    at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:133) [spigot-1.8.8.jar:git-Spigot-21fe707-e1ebe52]
    
    at org.bukkit.craftbukkit.v1_8_R3.CraftServer.loadPlugins(CraftServer.java:292) [spigot-1.8.8.jar:git-Spigot-21fe707-e1ebe52]
    
    at net.minecraft.server.v1_8_R3.DedicatedServer.init(DedicatedServer.java:198) [spigot-1.8.8.jar:git-Spigot-21fe707-e1ebe52]
    
    at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:525) [spigot-1.8.8.jar:git-Spigot-21fe707-e1ebe52]
    
    at java.lang.Thread.run(Thread.java:813) [?:1.8.0_212]
    
    Caused by: java.io.FileNotFoundException: Jar does not contain plugin.yml
    
    ... 6 more
    Main.java
    Code:
    package me.rickmine2006chat;
    import org.bukkit.plugin.PluginManager;
    import org.bukkit.plugin.java.JavaPlugin;
    public class Main extends JavaPlugin {
    
    private static Main instance;
    
    public void log(String string) {
    System.out.println(string);
    }
    
    public static Main getInstance() {
    return instance;
    }
    
    public void registerListeners() {
    PluginManager pm = getServer().getPluginManager();
    pm.registerEvents(new PlayerListener(this), this);
    
    }
    
    //onEnable starts here
    
    @Override
    public void onEnable(){
    getLogger().info("has been enabled!");
    instance = this;
    registerListeners();
    this.saveDefaultConfig();
    }
    
    @Override
    public void onDisable(){
    getLogger().info("has been disabled");
    instance = null;
    }
    }

    PLEASE HELP
     
    Last edited by a moderator: Oct 22, 2019
  2. Offline

    DasBabyPixel

    You have "authors: XXX" in the Plugin.yml BUT it is called "author: []". The [] indikates an Array like [X] or [X,Y,Z]
     
  3. Offline

    KarimAKL

    @rickjuhh Where is your plugin.yml file located?

    EDIT: @DasBabyPixel You can use both "author" and "authors", it's explained here. The error also says
     
    Last edited: Oct 22, 2019
  4. Offline

    rickjuhh

    Attached Files:

    Last edited by a moderator: Oct 22, 2019
  5. Online

    timtower Moderator Moderator

    @rickjuhh plugin.yml needs to be lowercase
     
    KarimAKL likes this.
  6. Offline

    rickjuhh

    oke its not works what must I do now?
     
  7. Online

    timtower Moderator Moderator

    You open up the jar with a zip program and check if the file is there.
     
  8. Offline

    rickjuhh

    Wat is a good zip program?
     
  9. Online

    timtower Moderator Moderator

    Anything will do
     
  10. Offline

    ThePandaPlayer

    @rickjuhh
    7Zip, WinRAR, even simply renaming the JAR file to .zip should work in order to open it up. Just be sure to rename it to a jar file once you've checked.
     
  11. Offline

    rickjuhh

    i cant find that code
     
  12. Online

    timtower Moderator Moderator

    @rickjuhh Then you are doing something wrong when exporting the jar.
     
  13. Offline

    Niv-Mizzet

    @rickjuhh mark this thread as solved if you are done, so people don't help this thread instead of someone who actually needs help. Also, thank whoever fixed your problem. If you still have a problem, repost with the issue.
     

Share This Page