Could not load 'plugins\TentMod.jar' in folder 'plugins'

Discussion in 'Plugin Development' started by ArsenArsen, Jul 1, 2014.

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

    ArsenArsen

    0:33:24 [SEVERE] Could not load 'plugins\TentMod.jar' in folder 'plugins'
    0:33:24at net.minecraft.server.v1_7_R1.DedicatedPlayerList.<init>(SourceFile:14) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
    0:33:24at net.minecraft.server.v1_7_R1.ThreadServerApplication.run(SourceFile:617) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
    0:33:25... 9 more
    0:33:25... 9 more
    MAIN java
     
  2. Offline

    HeadGam3z

    Full stack-trace?
     
  3. Offline

    Phasesaber

    Make sure it is not a Forge Mod, as those do not go into the plugin folder.
     
  4. Offline

    fefe2008

  5. Offline

    HeadGam3z

    fefe2008
    It's his post, he automatically watches it. lol
     
  6. Offline

    Phasesaber

    You don't have to do that if it is their post.
     
  7. Offline

    ArsenArsen

    Phasesaber I coded it
    http://pastebin.com/sbvSmA9S I have WorldEdit and Vault on build path

    This is cuz this plugin starts before valut and we

    And its at public static Economy econ = rsp.getProvider();

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 9, 2016
  8. Offline

    chocolate_with

    ArsenArsen
    In your plugin.yml put this in here:

    main: me.ArsenArsen.tentmod.Main
     
  9. Offline

    ArsenArsen

    Yes.

    I did chocolate_with

    Is it possible to do publicstatic RegisteredServiceProvider<Economy> rsp = Bukkit.getServer().getServicesManager().getRegistration(Economy.class);
    then:
    public static Economy econ = rsp.getProvider();
    then:
    publicstatic Economy eco =null;
    on the end

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 9, 2016
  10. Offline

    chocolate_with

    ArsenArsen

    Do you just export your plugin from your editor?
    If so.., that might also cause this problem.
     
  11. Offline

    ArsenArsen

    What i need t do, i did that!?!?
     
  12. Offline

    chocolate_with

    ArsenArsen

    There is nothing wrong with it.., but if you use eclipse or any other and just export your plugin.
    It might not read your plugin.yml and skips exporting plugin.yml.

    You might wanna open your plugin .jar and put the plugin.yml manually in there.
     
  13. Offline

    ArsenArsen

  14. Offline

    chocolate_with

    ArsenArsen

    Please don't use caps.
    How do I say it.., uhm someone please help?
    I had this problem before.., so then I used the Maven dependencies and it fixed.
    But is there any other way to let this work?

    I forgot the word for this problem.., it might need something like compiling in order too work.
    ---------
    Anyways.., did you check if your plugin.yml is empty?
     
  15. Offline

    ArsenArsen


    Plugin.yml is right, but
     
  16. Offline

    chocolate_with

    ArsenArsen

    So far I know it hasn't to do anything with your code?
    It looks fine for me.

    Don't know if someone has the same thoughts.

    However, this might cause it too in your function onEnable():
    Code:
    if(tent != null ){
                    severe(np + "You need tent.schematic in folder TendMod to run this plugin!");
            }else{
                    init();
                    PluginDescriptionFile pdfFile = getDescription();
                logger.info(np + pdfFile.getName() + " V." + pdfFile.getVersion() + " Has Been Enabled");
                onUpdate();
            }
    
     
  17. Offline

    AoH_Ruthless

    ArsenArsen
    You can't initialize it where you declare the field; not in your main class anyways. You have to initialize it in your onEnable(). That's what I think the error is, but you never provided us the full stacktrace.
     
    chocolate_with likes this.
  18. Offline

    ArsenArsen

    AoH_Ruthless i did, i cant do it cuz i need it in static field, cant initialize something witch is static using non-static onEnable().
     
  19. Offline

    AoH_Ruthless

  20. Offline

    ArsenArsen

  21. Offline

    chocolate_with

    thanks for helping man.., I ran out of options.
    Man.., plugin development is harder than just plain java development ;s.

    But I keep thinking it has something to do with his onEnalbe() function.
     
  22. Offline

    ArsenArsen

  23. Offline

    AoH_Ruthless

    ArsenArsen
    You don't need static. What you need is to learn why it's bad for what you are doing (i.e, actually take the time to learn some Java). Static actually is detrimental to your code in most contexts. Static-happy coders usually get errors like this.

    Seriously, remove all static in all classes where they are bad (you will know if you actually read up on it), and fix errors accordingly.

    Edit: chocolate_with It's okay that you tried. We can't all see the error all the time; plugin development is Java development, I think what you are trying to say developing against an API can be challenging ... but nevertheless, it's still Java. This is not just a Bukkit issue, but the use of static identifiers in a bad context is a Java problem because OP has never taken the time to learn Java fully.
     
  24. Offline

    chocolate_with

    ArsenArsen

    Have you tried to make a new class for this in onEnable()?:
    Code:
    if(tent != null ){
                    severe(np + "You need tent.schematic in folder TendMod to run this plugin!");
            }else{
                    init();
                    PluginDescriptionFile pdfFile = getDescription();
                logger.info(np + pdfFile.getName() + " V." + pdfFile.getVersion() + " Has Been Enabled");
                onUpdate();
            }
    
    
    If not try to do that and let that class implements Listener, then go back to your main class and put this in there.
    Code:
    ....
    public static boolean payment;
    public static String np = ChatColor.BOLD + "[TentMod] " + ChatColor.RESET;
    private static List<Listener> e = new ArrayList<Listener>();
    
    and in onEnable();:
    Code:
    public void onEnable()
        {
            this.getConfig().options().copyDefaults(true);
           e.add(new <class_name>(this));
           
        }
    
    Note:
    For e.add(new <class_name(this)); must be the class name where you put the code:
    Code:
            if(tent != null ){
                    severe(np + "You need tent.schematic in folder TendMod to run this plugin!");
            }else{
                    init();
                    PluginDescriptionFile pdfFile = getDescription();
                logger.info(np + pdfFile.getName() + " V." + pdfFile.getVersion() + " Has Been Enabled");
                onUpdate();
            }
    
     
  25. Offline

    ArsenArsen

    if(static.delete.result == yes){
    arsenarsen.kill
    } else {
    Sistem.outPrint("Didnt worked")

    Console output:
    Didnt worked
     
  26. Offline

    chocolate_with


    Yep.., it sucks actually.
    I can't even seem to let the bukkit permissions to work s;.., I have an topic about that.

    But still.., if he uses eclipse.
    It is really going to say that the static is needed(occurrs more in the later versions).
    Sigh.., I wish there was an option to turn off the warnings and errors :p.

    Also.., there shouldn't be an if statement in onEnable?
     
  27. Offline

    AoH_Ruthless

    chocolate_with
    There is an option to turn off warning and errors. I believe it is Windows > Preferences > Java > Editor (?) > errors and warnings.

    There might not be an editor step in there.

    ArsenArsen
    Seriously, removing static would probably put you 80% towards fixing the error. Instead of joking about it, try heeding my advice and learning Java.
     
  28. Offline

    ArsenArsen

    U kan delete warning and ignore it, loke i did :p
     
  29. Offline

    chocolate_with

    ArsenArsen

    Have you tried this?

    AoH_Ruthless

    Thanks.
    I don't like eclipse, but I use it due it's intergrations, because I don't want to mess with source codes to intergrate something.
     
Thread Status:
Not open for further replies.

Share This Page