Development Assistance Weird ass NPE, dont know why?

Discussion in 'Plugin Help/Development/Requests' started by iAmGuus, May 30, 2015.

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

    iAmGuus

    Hi all,

    So I was working on this plugin for already the whole day. It might have been that I am just really tired and don't think straight, but anyways.
    So I got this weird NPE that says that my PerPlayerConfig class is null. Don't know how.

    Code: http://pastebin.com/yYZixdE9

    This is the error: http://pastebin.com/Z32tMPz4

    PerPlayerConfig (which always works): http://pastebin.com/EzdFUmSU

    Calendar of java itself.

    Line 67:
    Code:
    ppc.saveFile();
    If I need to show some other classes that are named in the method, please let me know, and I'll add them.

    Thanks for your help.

    Regards,
    iAmGuus
     
  2. Offline

    timtower Administrator Administrator Moderator

    Moved to Bukkit alternatives
     
  3. Offline

    mine-care

    @iAmGuusi think we need to see the PerPlayerConfig class too :/
    Also in the code above, i dont thinky ou need both lines 5 and 16 : 3 most likely you need just line 16.
     
  4. Offline

    iAmGuus

    @mine-care I can indeed remove line 5, but I was just debugging a bit to check things, you know.
    The PerPlayerConfig class is included in the main post
     
  5. Offline

    mine-care

    @iAmGuus i guess i am more tiered! :O i didnt even notice it :O :O :O (11 hours of physics can be the reason....)

    Anyway, it still seems odd... In class PerPlayerConfig are you sure f is not null? i think that loadConfiguration will be null if the file does not exist.
    Also i saw that:
    (File)this.d
    d is already a file, you dont need to cast it to File.
     
  6. Offline

    iAmGuus

    @mine-care I am sure all of it exists and is not null. I removed the cast, exported it and tried it again. Still the same error.
     
Thread Status:
Not open for further replies.

Share This Page