I'm trying to call a function in the main class from another class called CookFood, but it doesn't want to work.
Everything inside the CookFood class works fine, like getting the food name and the actual cooking.
CookFood:
package reflexd;
import org.osbot.rs07.api.model.Entity;
import org.osbot.rs07.api.ui.RS2Widget;
import org.osbot.rs07.script.Script;
import org.osbot.rs07.script.MethodProvider;
import reflexd.Main;
public class CookFood {
private Main main = new Main();
private String foodName = main.getFoodName(); // works
public CookFood(Script s) throws InterruptedException {
main.changeStatus("Moving camera"); // doesn't work
}
}
The function in Main that I'm trying to access:
public void changeStatus(String status) {
scriptStatus = status;
}
How I'm initializing CookFood:
case COOK:
new CookFood(this);
break;
It doesn't spit out any errors or anything at all in the logger, don't really know what to do.
Any help is greatly appreciated.