Use Script class in the other classes so for example. You main script class is called CombatScript.java and it extends Script.
Make a new class called Combat which take a parameter of type Script to be able to use all the script methods
it will look something like this:
public class Combat { public Combat(Script script) { this.script = script; } public void attack() { script.client..//etc bla bla bla } public Script getScript() { return script; } private Script script;}
and In onStart method in your main class you do something like
Combat combat = new Combat(this);
by this, you passed the script object(your main class) to your combat class and avoid getting null exception
now you can call any method of the combat class such as
combat.attack();
Hope you understand.. im bad at explaining.
if you need anything feel free to ask