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

  2. Offline

    chocolate_with

    ArsenArsen

    Just in that new class put this here:
    Code:
    public class <classname> implements Listener{
    // Make a new public function and put the if statement in there
    }
    
    Also I suggest to put those warnings and errors back on.
    Too see wich things needs to be imported.
     
  3. Offline

    ArsenArsen

    Code:java
    1. package me.ArsenArsen.tentmod;
    2.  
    3. import org.bukkit.Bukkit;
    4. import org.bukkit.event.Listener;
    5.  
    6. public class Init implements Listener
    7. {
    8. public void checkValut(){
    9. if (Bukkit.getServer().getPluginManager().getPlugin("Vault") == null) return;
    10. }
    11. }

    like that?

    ?? The constructor Init(Main) is undefined ??

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

    chocolate_with

    ArsenArsen
    Whoops...
    It must be:
    Code:
    package me.ArsenArsen.tentmod;
     
    import org.bukkit.Bukkit;
    import org.bukkit.event.Listener;
     
    public class Init implements Listener
    {
    
      private Main plugin;
    
      public Main(Main plugin) {
      this.plugin = plugin;
      }
        public void checkValut(){
            if (Bukkit.getServer().getPluginManager().getPlugin("Vault") == null) return;
        }
    }
    
    So far I remember out of my head.
     
  5. Offline

    Necrodoom

    AoH_Ruthless likes this.
  6. Offline

    chocolate_with

    Necrodoom

    And again.., it is a pain to switch from plain java development to plugin development with different funtions and variables and whatever.
    Just give me the time to understand the bukkit variables and functions.

    Yes.., I ignore the warnings even if it is on.., but still when it is off.
    I turn it on just too see if something needs to be imported from bukkit.

    But I keep thinking closer and closer that you ignore this everytime..., but that is allright.
    Everybody does that to me when it comes to scripting.

    Even in real life.., people are bullying me and saying that I cannot reach anything that I want.
    Because they think I am dumb because my low IQ, wich is 77.
    For those who don't know, IQ is the rate on how fast you can learn if I said this correctly.

    Except for AoH_Ruthless, he is literally the first one that doesn't ignore me when it comes to this.

    ---
    Anyways.., I think it was a bug onEnable(); because when I put an if statement in there.
    The whole plugin crashes or don't want to load.
    ---

    ArsenArsen

    Yes please.., remove the statics :d.
    Just simply try to ignore Eclipse errors, it's annoying but still.
    Eclipse messes with plugins, because it doesn't understand intergrations from games and servers(like bukkit).
     
  7. Offline

    Necrodoom

    chocolate_with if you want to help people, you would need to know the subject before trying to help.

    "Just ignore the eclipse errors" yeah, thats not going to work well.. Errors are there for a reason. They show you you have a problem in your code.

    And know, that I do not care about your IQ, your real life experience, etc. All I care about is proper support, and if you are leading the OP down the wrong path, this is where I step in.
     
  8. Offline

    chocolate_with

    Necrodoom

    I know that, so that is why I only post on topics where I think I can help.

    ---
    Also.., some people find it important on what I putted there about my life and IQ..

    Anyways.., we shouldn't discuss about it here.
    It is getting off-topic wich isn't allowed.
     
  9. Offline

    ArsenArsen

  10. Offline

    Necrodoom

  11. Offline

    chocolate_with

    ArsenArsen

    hmm.., I don't know then.

    Also I think it might be helpful for the others if you put also your plugin.yml here.

    -----

    Aww Necrodoom was faster than me.
    Good Job :D.
     
  12. Offline

    ArsenArsen

    I changed main http://pastebin.com/hbcc2vhM

    http://pastebin.com/ZxwZBvQ7
    Necrodoom after // i putted what error it is at EXACT same line

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

    xize

    ArsenArsen

    this line:
    Code:
    public File tent = new File(this.getDataFolder(), "tent.schematic");
    
    may results in null, the reason why it may results null is because the JavaPlugin (this.getDataFolder()) isn't initalized because it will be initalized only when onEnable has run normally fields get faster loaded even before onEnable, you may think in theory putting those fields under onEnable might work which is actually a wrong theory, so in this case you may want to do:

    public File tent;

    and then in onEnable you do this: this.tent = new File(this.getDataFolder()) this would fix a NPE there.

    I hope you understand my explanation, never initalize fields without doing it through onEnable when working with things from the plugin instance ;)
     
  14. Offline

    ArsenArsen

    Thats run after command, remember?!?! And log say that error is at Economy econ = rsp.getProvider(); xize
     
  15. Offline

    Jade

    Locked. We do not support servers with authentication disabled.
     
Thread Status:
Not open for further replies.

Share This Page