Solved [SEVERE] Could not pass event... but no errors in the .java file? help! :(

Discussion in 'Plugin Development' started by tom1000o, Oct 29, 2012.

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


    I figured it out!
    instead of:

    1. World world = event.getEntity().getWorld();
    2. Location location = event.getEntity().getLocation();

    i used:

    1. Location location = event.getLocation();
    2. World world = event.getLocation().getWorld();

    the problem:
    i used getEntity() when storing the world & location, all i needed was getLocation() and getWorld(). thanks to everyone who helped me :)
  2. Offline


    Caused by: java.lang.NullPointerException
    Line 32 is?
  3. Offline


    ah. i should look over the errors more closely, but i still don't see how its an error.. :p
    EDIT: if i remember right, nullPointerException is what happens when you try to use a value thats null... hmm
    EDIT 2: i dont get it! its working perfectly but the console error isn't going away!

    World world = event.getEntity().getWorld();
    world.createExplosion(location, 0);
    also, is there a way to format the code box for java? ^^^ ive seen other posts with a dark background that do this.
  4. Offline


    Wrap your code in [ syntax=java][/syntax ] block tags.

    Is there something you're not showing us? I threw the code into NP++ and line 36 is the closure of a void
  5. Offline


    looking back i noticed i left out 2 blank lines above the package notation, other then that you see everything i see :s ill go throw that in the main post. Any help on this is much appreciated..i just cant figure it out.

    1. and thanks :)
Thread Status:
Not open for further replies.

Share This Page