[Error] Could not load plugin in folder plugins

Discussion in 'Plugin Development' started by NoLife, Feb 23, 2015.

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

    NoLife

    I is jsut starting on learning the Bukkit API and then very early i come in to this problem. I really want to test the thing i do, so i better can understand it. I have now searching google for a hour and could't ffind anything that help me.
    Error:
    Code:
    [22:10:18 INFO]: Starting minecraft server version 1.8
    [22:10:18 INFO]: Loading properties
    [22:10:18 INFO]: Default game type: SURVIVAL
    [22:10:18 INFO]: Generating keypair
    [22:10:18 INFO]: Starting Minecraft server on *:25565
    [22:10:18 INFO]: This server is running CraftBukkit version git-Bukkit-"24557bc"
    (MC: 1.8) (Implementing API version 1.8-R0.1-SNAPSHOT)
    [22:10:18 ERROR]: Could not load 'plugins\LearnPL-0.0.1-SNAPSHOT.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-"24557bc"]
            at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager
    .java:133) [craftbukkit.jar:git-Bukkit-"24557bc"]
            at org.bukkit.craftbukkit.v1_8_R1.CraftServer.loadPlugins(CraftServer.ja
    va:286) [craftbukkit.jar:git-Bukkit-"24557bc"]
            at org.bukkit.craftbukkit.v1_8_R1.CraftServer.<init>(CraftServer.java:24
    8) [craftbukkit.jar:git-Bukkit-"24557bc"]
            at net.minecraft.server.v1_8_R1.PlayerList.<init>(PlayerList.java:68) [c
    raftbukkit.jar:git-Bukkit-"24557bc"]
            at net.minecraft.server.v1_8_R1.DedicatedPlayerList.<init>(SourceFile:14
    ) [craftbukkit.jar:git-Bukkit-"24557bc"]
            at net.minecraft.server.v1_8_R1.DedicatedServer.init(DedicatedServer.jav
    a:133) [craftbukkit.jar:git-Bukkit-"24557bc"]
            at net.minecraft.server.v1_8_R1.MinecraftServer.run(MinecraftServer.java
    :475) [craftbukkit.jar:git-Bukkit-"24557bc"]
            at java.lang.Thread.run(Unknown Source) [?:1.8.0_20]
    Caused by: java.io.FileNotFoundException: Jar does not contain plugin.yml
            ... 9 more
    [22:10:18 INFO]: Preparing level "world"
    [22:10:18 INFO]: Preparing start region for level 0 (Seed: 6432779559351347630)
    [22:10:19 INFO]: Preparing start region for level 1 (Seed: 7093347337793168259)
    [22:10:19 INFO]: Preparing start region for level 2 (Seed: 7093347337793168259)
    [22:10:20 INFO]: Server permissions file permissions.yml is empty, ignoring it
    [22:10:20 INFO]: Done (1,486s)! For help, type "help" or "?"
    plugin.yml
    Code:
    name: LearnPL
    main: io.github.Waterman2707.LearnPL.Test
    version: 1.0
    
    commands:
      basic
        description: This is a demo command.
        usage: /<command> [player]
        permission: learn.basic
        permission-message: You don't have permission for this command
      basic2
        description: This is a demo command for players.
        usage: /<command> [player]
        permission: learn.basic2
        permission-message: You don't have permission for this command
    Main/Test
    Code:
    package io.github.Waterman2707.LearnPL;
    
    import org.bukkit.command.Command;
    import org.bukkit.command.CommandExecutor;
    import org.bukkit.command.CommandSender;
    import org.bukkit.entity.Player;
    import org.bukkit.plugin.java.JavaPlugin;
    
    public class Test extends JavaPlugin {
    
        @Override
        public void onEnable(){
            getLogger().info("onEnable has invoked!");
        }
       
        @Override
        public void onDisable(){
            getLogger().info("onDisable has invoked!");
        }
       
        @Override
        public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
            if (cmd.getName().equalsIgnoreCase("basic")) { // If the player typed /basic then do the following...
                // do something...
                return true;
            } else if (cmd.getName().equalsIgnoreCase("basic2")) {
                if (!(sender instanceof Player)) {
                    sender.sendMessage("This command can only be run by a player.");
                } else {
                    Player player = (Player) sender;
                    // do something
                }
                return true;
            }
            return false;
        }
       
    }
    
     
  2. Offline

    shades161

  3. Offline

    NoLife

    I'm not with my computer now, but i look's like it's a essential fail from my side :p
    I was sure i have put it the eight way...[​IMG]

    {{----post merged----}}

    Okay now have i trued but it still NOT work [​IMG]
     
    Last edited by a moderator: Feb 23, 2015
  4. Offline

    DaanSander

    what source code editor are you using eclipse inteliJ etc.
     
  5. Offline

    NoLife

    I using eclipse ;)
     
  6. Offline

    MaTaMoR_

    1)Where is your plugin.yml ? It should be at default package
    2)
    Code:
    name: LearnPL
    main: io.github.Waterman2707.LearnPL.Test
    version: 1.0
    
    commands:
      basic: <-- Here ":"
        description: This is a demo command.
        usage: /<command> [player]
        permission: learn.basic
        permission-message: You don't have permission for this command
      basic2: <-- Here ":"
        description: This is a demo command for players.
        usage: /<command> [player]
        permission: learn.basic2
        permission-message: You don't have permission for this command
    
     
  7. Offline

    NoLife

    Thank you :D now it works, it's the worst off programming, a so little thing can destroy the entire code :p
     
Thread Status:
Not open for further replies.

Share This Page