onEnable not being called?

Discussion in 'Plugin Development' started by beastman3226, Jul 19, 2013.

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

    beastman3226

    I have debugging references in my onEnable() method however they don't seem to be called on startup.
    Code:java
    1.  
    2. @Override
    3. public void onEnable() {
    4. getCommand("listpaths").setExecutor(this);
    5. this.getLogger().log(Level.FINE, "got here 1");
    6. for(int i = 0; i < ItemConverter.bmList.size(); i++) {
    7. this.getLogger().log(Level.INFO, ItemConverter.bmList.get(i).path);
    8. }
    9. this.getLogger().log(Level.FINE, "got here 2");
    10. }

    Neither "got here 1" or "got here 2" ever show up in my console.
     
  2. Offline

    Quackster

    Add some logging calls first so you know if your function is or isn't working first.

    Code:
    @Override
    public void onEnable() {
    this.getLogger().info("onEnable is being called!");
    
     
  3. Offline

    Techy4198

    sounds like you forgot
    load: STARTUP
     
  4. Offline

    beastman3226

    Why doesn't .log() work?
     
  5. Offline

    ZeusAllMighty11

    Techy4198

    You don't need that.


    The issue is that your plugin isn't even detected, probably errors somewhere
     
  6. Offline

    beastman3226

    Fixed, .info(). Was being called just didn't properly do some other stuff. thanks.
     
  7. Offline

    Techy4198

    actually you do need it, otherwise it won't load on startup. duh.
     
  8. Offline

    ZeusAllMighty11


    Actually you don't need that. Nobody uses that.
    You should not be messing with priorities if you don't know what you are doing.
     
  9. Offline

    Techy4198

    priorities? what are you on about? i meant in plugin.yml lol
     
  10. Offline

    ZeusAllMighty11


    ...
     
  11. Offline

    Bart

    The only 3 things required in a plugin yml for the plugin to function (No commands or anything) are main, name and possibly version
     
  12. Offline

    Techy4198

    well, in that case smartasses, tell me why none of my plugins work unless i put load: Startup in the plugin.yml?
     
  13. Offline

    Bart

    You should not have to put startup in your plugin.yml, I have never done it and I write plugins for a community with 15,000 members.
     
  14. Offline

    jayfella

    See here: http://wiki.bukkit.org/Plugin_YAML

    It is not mandatory.

    also, Techy4198 - it is often very interesting to be wrong - it means you learnt something. Don't be so defensive lol. Nobody knows everything, and learning something new is always awesome in the land of programming. I've been a self-employed programmer for a long long time, and I still learn something new almost every day.
     
  15. Offline

    Techy4198

    seriously though, am i doing something wrong if my plugins won't start without that line?

    also, i have said the same in many other threads and nobody told me it was wrong until this time. and i've seen many other people saying the same thing in threads, and on most occasions it makes it work.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 3, 2016
Thread Status:
Not open for further replies.

Share This Page