Very annoying error! after new build

Discussion in 'Plugin Development' started by Moon_werewolf, Feb 2, 2011.

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

    Moon_werewolf

    on of my most simplest code dont work after the new build on bukkit and i dont know. i have try much i know but still with out luck :/

    Code:
    public BankDoor isBankDoor(Block block)
        {
            for(BankDoor door : doors)
            {
                if(block.getX() == door.x && block.getY() == door.y && block.getZ() == door.z)
                {
                    return door;
                }
    
                if(block.getX() == door.altX && block.getY() == door.altY && block.getZ() == door.altZ)
                {
                    return door;
                }
            }
    
            return null;
        }
    the error i get is
    here is the code for BankDoor
    http://pastebin.com/dTkS0SqF
     
  2. Offline

    Redecouverte

    you could try adding

    if(block == null) return;

    at the top, it seems to me that sometimes events give null values.
    i had that problem with the blocks given by onEntityExplode
     
  3. Offline

    Moon_werewolf

    Thx :) it worked :D
     
Thread Status:
Not open for further replies.

Share This Page