plugin.yml not loading

Discussion in 'Plugin Development' started by ordu34, Jul 22, 2021.

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

    ordu34

    plugin.yml is not loading.
    My bukkit/spigot version is 1.8

    I'm trying to create a command

    my command is not working it gives this error

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jul 22, 2021
  2. Online

    timtower Administrator Administrator Moderator

  3. Offline

    ordu34

    plugin.yml =
    Code:
    name: CopPlugini
    main: org.copplugini.Main
    version: 1.0.0
    
    commands:
        merhaba:
            description: merhaba komutu
            usage: /<command>
    
    I'm posting from here because my internet is bad

    Code:
    Could not load 'plugins\Deneme13olsunartik.jar' in folder 'plugins'
    org.bukkit.plugin.InvalidDescriptionException: Invalid plugin.yml
            at org.bukkit.plugin.java.JavaPluginLoader.getPluginDescription(JavaPluginLoader.java:154) ~[spigot2.jar:git-Spigot-db6de12-18fbb24]
            at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:133) [spigot2.jar:git-Spigot-db6de12-18fbb24]
            at org.bukkit.craftbukkit.v1_8_R3.CraftServer.loadPlugins(CraftServer.java:292) [spigot2.jar:git-Spigot-db6de12-18fbb24]
            at net.minecraft.server.v1_8_R3.DedicatedServer.init(DedicatedServer.java:198) [spigot2.jar:git-Spigot-db6de12-18fbb24]
            at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:525) [spigot2.jar:git-Spigot-db6de12-18fbb24]
            at java.base/java.lang.Thread.run(Thread.java:831) [?:?]
    Caused by: java.io.FileNotFoundException: Jar does not contain plugin.yml
            ... 6 more
    [09:09:59 ERROR]: Could not load 'plugins\Deneme14olsunartik.jar' in folder 'plugins'
    org.bukkit.plugin.InvalidDescriptionException: Invalid plugin.yml
            at org.bukkit.plugin.java.JavaPluginLoader.getPluginDescription(JavaPluginLoader.java:154) ~[spigot2.jar:git-Spigot-db6de12-18fbb24]
            at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:133) [spigot2.jar:git-Spigot-db6de12-18fbb24]
            at org.bukkit.craftbukkit.v1_8_R3.CraftServer.loadPlugins(CraftServer.java:292) [spigot2.jar:git-Spigot-db6de12-18fbb24]
            at net.minecraft.server.v1_8_R3.DedicatedServer.init(DedicatedServer.java:198) [spigot2.jar:git-Spigot-db6de12-18fbb24]
            at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:525) [spigot2.jar:git-Spigot-db6de12-18fbb24]
            at java.base/java.lang.Thread.run(Thread.java:831) [?:?]
    Caused by: java.io.FileNotFoundException: Jar does not contain plugin.yml
            ... 6 more
    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jul 22, 2021
  4. Online

    timtower Administrator Administrator Moderator

    @ordu34
    Code:
    Caused by: java.io.FileNotFoundException: Jar does not contain plugin.yml
    Take a wild guess.
     
    davidclue likes this.
  5. Offline

    ordu34

    Komut.java=

    package org.copplugini;

    import org.bukkit.command.Command;
    import org.bukkit.command.CommandExecutor;
    import org.bukkit.command.CommandSender;
    import org.bukkit.entity.Player;

    public class komut implements CommandExecutor{
    Main plugin = new Main();
    @Override
    public boolean onCommand(CommandSender arg0, Command arg1, String arg2, String[] arg3) {
    Player oyuncu = (Player) arg0;

    return true;
    }

    }

    Main.java=
    package org.copplugini;



    import org.bukkit.plugin.java.JavaPlugin;
    public class Main extends JavaPlugin{

    public void onEnable() {
    getLogger().info("Deneme3 Haz─▒r!");
    this.getCommand("merhaba").setExecutor(new komut());

    }



    }

    src
    plugin.yml
    package=org.copplugini
    Main.java
    Komut.java

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jul 22, 2021
  6. Online

    timtower Administrator Administrator Moderator

    @ordu34 1. Stop making multiple posts in a row, you will get warned.
    2. Move your plugin.yml to outside your source folder and into the project root.
     
Thread Status:
Not open for further replies.

Share This Page