interact already has visibility and camera handling checks and methods, so there's no need to call willow#isVisible at all. Infact, what kitiria had originally was probably much better, as your method will get in a continuous sleep loop if the willow isn't null but is off the screen.
@Kitiria:
If you really wanted to make it more efficient and not get permanently stuck, you can use a filter (a neat way of doing this is with streams, like so):
objects.getAll().stream().filter(obj -> (obj.exists() && obj.getName().equals("Willow") && obj.hasAction("Chop-down") && getMap().distance(obj) <= 10)).collect(Collectors.toList());
which will reasonably efficiently generate a collection of all the nearby objects with the name willow and the interaction option chop down within a distance of 10 tiles from the player. you can then proceed to iterate through this collection and further filter it to find your desired tree, and then interact with it like so
if (tree != null && tree.exists()) {
tree.interact();
}
~apa