Thanks, i will give it a shot as soon as I have more time to spare! Will update if it will work!
if (Greenfoot.isKeyDown("e") && Lockpick > 0)Door d = (Door) getOneIntersectingObject(Door.class); if (d != null && !d.getState())