Everything seems to be null...

Discussion in 'Plugin Development' started by kdude63, Nov 29, 2012.

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

    kdude63

    I'm at a total loss. Been experimenting and testing for the last 2.5 hours, and regardless of what I do, nothing will fire because something isn't allowing a '!= null' to pass as true. My plugin loads, and there are. no. errors. no matter what I do.

    Can someone please help me? ._.

    The entire plugin is just one .java file along with the standard plugin and config yaml files.
    http://github.com/kdude63/ArmorPerms

    I know at this point I'm pretty much asking to be spoonfed, and I apologize. But I, for the life of me can't figure it out.

    And if it's something ridiculously simple, I shall be sad.
     
  2. Offline

    Terradominik

    i think you shouldn't use that much null-related things, setting all the veriables to null isn't very useful (in onDisable()). To avoid the whole "!= null" thing in the main part use try/catch in th constructor (although i think you should use a little bit more object orientation instead of writing everything in one file)
     
  3. Offline

    kdude63

    So basically, I should remove the section where all the variables are set to null, and remove some of the "!= null" checks throughout the code?

    I'm actually slightly confused here.
     
  4. Offline

    RealDope

    Just debug, right before and right after some of the null checks, add a "System.out.println("test")" so that you can see where the code stops.
     
  5. Offline

    makskay

    My suggestion? Insert numbered logger calls within every control flow block so that you can follow the way the code executes and isolate the source of the problem. The main issue here is that there's no way to easily discern what's executing and what isn't.
     
Thread Status:
Not open for further replies.

Share This Page