getOneIntersectingObject() is not a boolean method.
you need to write
instead
1 | if (getOneIntersectingObject(shot. class ) != null ) |
1 | if (getOneIntersectingObject(shot. class ) != null ) |