Technical (fail) difficulties..

Discussion in 'Plugin Development' started by Lildirt, Oct 10, 2011.

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

    Lildirt

    Hi everyone, I am trying to learn how to start around with this fancy java coding.
    I seem to be stuck with an error that it cannot load my plug-in from the plug-ins folder.
    " [SEVERE] Could not load 'plugins\MineOS.jar' in folder 'plugins\' "'


    I was relatively bored and just wanted to make a simple message dispensing command, which in this case is /reboot.

    I've got a scrap class and plugin.yml here

    Code:
    package me.Lildirt.Learning2;
    
    import java.util.logging.Logger;
    
    import org.bukkit.command.Command;
    import org.bukkit.command.CommandSender;
    import org.bukkit.plugin.java.JavaPlugin;
    
    public class Learning2 extends JavaPlugin {
    
        Logger log = Logger.getLogger("Minecraft");
    
        public void onEnable(){
            log.info("Booting MineOS..");
        }
    
        public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args){
            if(cmd.getName().equalsIgnoreCase("reboot")){ // If the player typed /reboot then do the following...
                sender.sendMessage("MineOS is rebooting!");
                return true;
            } //If this has happened the function will break and return true. if this hasn't happened the a value of false will be returned.
            return false;
        }
    
    
    
        public void onDisable(){
            log.info("MineOS is shutting down..");
        }
    }
    
    And my plugin.yml

    Code:
    name: MineOS
    main: me.Lildirt.Learning2
    version: 0.01
    commands:
        reboot:
            description: Gives back a message, because it can.
            usage: /command
    
    From what I can understand, this error is from my .yml
    But, I don't understand how, or why for that matter?

    EDIT: Do please note all of this is what I learned from the Bukkit wiki. I cannot assure that this coding is remotely close to what it should be.
    EDIT2: I get "JAR creation failed. See details for additional information.
    Resource is out of sync with the file system: '/MineOS/plugin.yml'.
    " on Eclipse when trying to export my jar.. :(
     
  2. I'm sure there are more lines after this, one of them telling that the class "me.Lildirt.Learning2" cannot be found. Which is because me.Lildirt.Learning2 is the package, the class is me.Lildirt.Learning2.Learning2 ! So your plugin.yml has to look like this:
    Code:
    name: MineOS
    main: me.Lildirt.Learning2.Learning2
    version: 0.01
    commands:
        reboot:
            description: Gives back a message, because it can.
            usage: /command
    
    Click on the yml in eclipse file list (left side) and press F5. ;)
    If you're using linux mount the filesystem the workspace is on with the noatime option.

    And next time post the full error, not only the first line. ;)
     
  3. Offline

    Lildirt

    Oi.. I'm not going to get far on coding .. *brain throb*

    Okay then, all problems fixed. It was just me not refreshing the YML..
    I'm going to go hide in a corner now ._.

    This works fine on WinVista 32-bit, but not a win7 64-bit.
    Nice. FML.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 20, 2016
  4. What exactly is "this"?
     
  5. Offline

    Lildirt

    The most simple plug-in that I've ever seen.
    Just a plugin that you do a /command, and it returns a line of text.
     
Thread Status:
Not open for further replies.

Share This Page