Weirdest Glitch in the world!

Discussion in 'Plugin Development' started by AstramG, Apr 16, 2014.

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


    Okay, so I'm a pretty good coder as I've made numerous minigames and work for huge servers however I can't get this stupid piece of code to work! It's practically driving me insane right now due to its normal simplicity but for some reason it doesn't appear to be working for me even though I've done something similar many times!

    I'm calling a method in my onEnable of the Plugin class, and the method is included in the same class but it's not being run, I've tried numerous debugging techniques such as putting broadcast messages in front of each individual line, but something seems to be preventing it from being run at all.

    Here is a snippet of the code for what I'm trying to accomplish.

    1. @Override
    2. public void onEnable() {
    3. loadChannels();
    4. }
    6. public void loadChannels() {
    7. Bukkit.broadcastMessage("This broadcast is not being called at all!");
    8. //My method body below here
    9. }

    Honestly, I've never seen anything like this. I'm sure I'm putting it in the correct server plugins folder because I've deleted and re-installed the plugin many times for testing this bug.

    Thank you in advance if any of you could speculate on any ideas in how to troubleshoot this.

    EDIT: I also have other methods being called through the onEnable method that are working fine.
  2. Offline


    Type /reload in game and see if that does anything?
  3. Offline


    Did you check if...
    You have a plugin.yml?
    Is your plugin.yml okay?
    Is your plugin on the server plugin list?
    Does everything but this piece of code work fine?
    Is there an error on the onEnable()?
  4. Offline


    NonameSL Quackster
    There are no errors in the console, and the plugin.yml is set up fine due to the fact that the other commands work nicely. It's a pretty immense project as it is right now, but I can't get this stupid part to work.
  5. Offline


    Are you completely sure that everything else in your onEnable works? Try declaring that method then broadcasting something else and see if that works?
  6. Offline


    I'm certain the onEnable method works, I've tested exactly what you've suggested.

    All the sudden the onEnable isn't working anymore either. Does anybody know what to do when your onEnable method isn't calling?

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


    Check your plugin.yml. If your onEnable isn't being called, then there is something wrong with your plugin.yml
  8. Offline


  9. Offline


    I don't think there is anything wrong with the YAML I double checked each line. I even went through the process of manually re-typing it.
    name: PremierChat
    version: 0.3
    main: me.AstramG.PremierChat.PremierChat
    author: AstramG
        usage: /pc <args...>
        description: Base command for PremierChat!
    It's a shame that this occurred because I was working on this plugin for a few weeks now :p

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


    Use this website to parse all the YAML from your plugin file, to check for any errors:
  11. Offline


    I actually resolved my issue. Due to some issues with Bukkit not spitting out a NullPointException when it should've, it sort of trashed my plugin.
Thread Status:
Not open for further replies.

Share This Page