Isolate Posted April 19, 2014 Posted April 19, 2014 (edited) Edit: Going to stick with the normal way i code then. your API is silly enough as is, im not changing my whole style for it. Edited April 19, 2014 by Isolate
PolishCivil Posted April 19, 2014 Posted April 19, 2014 Yes i am logged in add System.out.println(client.myPlayer());System.out.println(client.getPosition());System.out.println(client.getPosition().getZ()); show output But yh u can always try script.client.getPlane()
Isolate Posted April 19, 2014 Author Posted April 19, 2014 (edited) add System.out.println(client.myPlayer());System.out.println(client.getPosition());System.out.println(client.getPosition().getZ()); show output But yh u can always try script.client.getPlane() i'll try that EDIT: nope error still Edited April 19, 2014 by Isolate
Joseph Posted April 19, 2014 Posted April 19, 2014 i'll try that EDIT: nope error still its a null pointer exception so check to see if your player isnt null null checking it plane
Swizzbeat Posted April 19, 2014 Posted April 19, 2014 You should be using an ArrayList here (while programming to the interface as well): List<ScriptTask> tasks = new ArrayList<ScriptTask>(); LinkedList orders elements sequentially, so their good when you need to add/remove things. ArrayList on the other hand has faster read access. It's not a big deal here but it's just something I noticed As for your actual question, most likely client is returning null because you don't have an instance of it. Actually, on second look that is 100% the issue because you're extending Script in your class which is giving you another instance of script besides the one that was actually initialized. You need to pass the Script instance from your main class to the separate classes you use.
Joseph Posted April 19, 2014 Posted April 19, 2014 dont let onGround extend script, make a constructor for the onGround and like swizz said initialize it. Use this as an example.
Isolate Posted April 19, 2014 Author Posted April 19, 2014 (edited) Going to stick with the normal way i code then. your API is silly enough as is, im not changing my whole style for it. Edited April 19, 2014 by Isolate