Plugin Won't load when no problems are shown/can be seen by me

Discussion in 'Plugin Development' started by jstuie, Oct 18, 2013.

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

    jstuie

    Hello,
    I am having a problem where I am writing code that shows no errors, I am adding everything neccesary to my plugin.yml, yet my plugin will not show up when i do /plugins, the message i have asked to show in console isnt showing, and no commands show. My code is:

    Code:java
    1. package jstuie.bkplugin.linkServer;
    2.  
    3. import org.bukkit.ChatColor;
    4. import org.bukkit.command.Command;
    5. import org.bukkit.command.CommandSender;
    6. import org.bukkit.plugin.java.JavaPlugin;
    7.  
    8. public class Main extends JavaPlugin {
    9.  
    10. @Override
    11. public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
    12. if(cmd.getName().equalsIgnoreCase("ls")){
    13. if(sender.hasPermission("linkserver.ls")) {
    14. sender.sendMessage(ChatColor.BLACK + "=====|" + ChatColor.AQUA + "LinkServer" + ChatColor.RESET + ChatColor.BLACK + "|=====");
    15. sender.sendMessage("Test");
    16. }else{
    17. sender.sendMessage("No Perms!");
    18. }
    19.  
    20. }
    21. return false;
    22.  
    23.  
    24. }
    25.  
    26. public String consolePrefix(){
    27.  
    28. return "[LinkServer]";
    29.  
    30. }
    31.  
    32. @Override
    33. public void onDisable() {
    34. getLogger().info(consolePrefix() + "LinkServer has been disabled");
    35. }
    36.  
    37. @Override
    38. public void onEnable() {
    39. getLogger().info(consolePrefix() + "LinkServer has been enabled");
    40. }
    41.  
    42.  
    43.  
    44. }


    and my plugin.yml is:
    Code:
    name: LinkServer
    main: jstuie.bkplugin.linkServer.Main
    version: 0.0.1
    commands:
      ls:
        description: LinkServer Help
        usage: "/ls"
       
    
    Any help appreciated
    Thanks
     
  2. Offline

    caseif

    This may sound silly, but did you export the proper JAR to the plugins folder? When you check the JAR, does it have the appropriate class files in it? If you aren't getting console errors when the server starts, then the only other issue I can think of is that Bukkit isn't detecting your plugin at all.
     
  3. Offline

    jstuie

    I opened the jar file with WinRar and the class I created is in there. When I export it as a jar in eclipse, I go to
    File/Export
    then I select jar file from the menu and change the save path to my desktop
    I am probibly making a really nooby mistake but i cant see it. Just to clarify, is this the right option to export as?: [​IMG]



    Update: I recompiled it and now I am getting a error in console.
    ScreenShot
     
  4. Offline

    Rocoty

    Good...an error! That's way better than no error if something is not working!

    This error tells you that you have tabs in the plugin.yml. Plugin.yml doesn't like tabs, get rid
     
  5. Offline

    jstuie

    I have gone through my plugin.yml and couldnt find any, anyway I deleted all indents and relpaced them again with spacebar and still no luck.

    thanks for your help guys anyway
     
  6. Offline

    SourceForums

    jstuie
    Please check if you have the plugin.yml in the right place. (This is something very basic but even experts sometimes make this mistake.)
     
  7. Offline

    ferrybig

    lookout if you use notepad++ to make the plugin.yml, it likes to replace spaces with tabs
     
  8. Offline

    jstuie

  9. Offline

    Techy4198

    jstuie no. it should be in the root of your project.
     
  10. Offline

    jstuie

    Ok, i have moved it there, and now I am not getting that error, But, im not getting anything. Nothing in the '/plugins' list, my command doesnt work, and '/help linkserver' doesnt work. Im sorry you have to suffer through my noobyness and it is probibly something really simple but you guys are experts and I am not. Thanks for all your help tho.
     
  11. Offline

    SourceForums

    jstuie
    It would be helpful if you can upload a screenshot of your plugin navigation tab. (With everything unlocked so that we can see what's in which file. Thanks!
     
    Gater12 likes this.
  12. Offline

    Janmm14

    jstuie
    check your jar file with winrar again and make sure the plugin.yml is at the root of your jar. I always put the plugin.yml in the src folder in eclipse and it was always at the right place at the end.
     
  13. Offline

    jstuie

  14. Offline

    user_90854156

    Put a space between "version" and "commands" in your plugin.yml?
     
Thread Status:
Not open for further replies.

Share This Page