Weird NullPointerException that I cannot find the source of.

Discussion in 'Spigot Plugin Development' started by Katakeru, Apr 25, 2017.

  1. I'm building a plugin called EcoKill for basic economy management, my issue is that I cannot run it due to a strange NullPointerException error that comes up every time I try to load it:


    I have read that it could be an issue if any command isn't registered, but I haven't found that at all. Here's my plugin.yml as well:


    I know that none of this info is helpful without the code itself, so here's a link to the repository itself with how far I've gotten:

    If you have any suggestions, please, do let me know. I've been trying to find the issue for so long and have come up with nothing.
  2. Add a dependency in plugin.yml for any plugins your plugin uses as libraries, I only saw Essentials in there at a quick glance, but you made it, you would know if there's more. This is so they load fully before your plugin loads, they could be part of the issue (Anyway, it's very good practice to do so)
  3. Alfie

    Patron - "s" is null. I'll submit a pull request with the fix.
    • Agree Agree x 1
  4. The only thing I use as a dependency is Vault. Thanks for letting me know, I'll add it to my plugin.yml file.
  5. line 87
    And line 41
    Are where your errors are what is on those two lines?

    Sent from my iPhone using Tapatalk
  6. I saw. Guess trying to do stuff at 3:30 AM is a bad idea after all haha. Anyways, thanks for your help and effort with the pull request, I just about managed to fix it on my own as well.
  7. Let's pretend it doesent give me line numbers. I suppose I could click the desktop version

    Sent from my iPhone using Tapatalk
  8. I've updated the repo with the suggested things you guys have said. However, I am still getting the same error trying to load the plugin on my server.\

    Edit: For the ones scrolling by, here:
    #9 Katakeru, Apr 25, 2017
    Last edited: Apr 25, 2017
  9. Well it seems to be coming from return chat != null;, so try when you initialize it at the top of the file remove = null, and maybe a test to see if rsp.getProvider(); is still returning anything, and maybe if that returns null, return true, if not just initialize chat and return false? I'm honestly not too sure at this point.
  10. Not sure exactly what to do anymore either. It is nothing more than a copy of Vault's API anyways..