Why this?
void chop() throws InterruptedException{
tree.interact("Chop down");
sleep(random(300,400));
}
You have no null checks.
Change to this ;
void chop() throws InterruptedException{
if(tree != null);
if(tree.isVisible());
tree.interact("Chop down");
sleep(random(300,400));
}
You got this but I prefer to check it again for nulls.
if(tree != null)
state = State.CHOP;