Jump to content

Muling help


Recommended Posts

Posted (edited)

     

However in the getState it now throws a NullPointer, can I fix this using an else method in my getState()?


        if(varrockEast.contains(myPlayer()) && getInventory().getItem("Jug of water").isNote()){ return State.TRADE; } 

maybe its tht?

Edited by Saiyan
  • Like 1
Posted
Just now, Saiyan said:

     
        if(varrockEast.contains(myPlayer()) && getInventory().getItem("Jug of water").isNote()){ return State.TRADE; } 

maybe its tht?

I know why it gives the NullPointer, but how else can I check if I got noted jugs instead of using the plain ID?

Posted
Just now, GaetanoH said:

I know why it gives the NullPointer, but how else can I check if I got noted jugs instead of using the plain ID?

umm instead of trying to get the note item just check if u have the item to begin with and it's in note form

i.e getInventory().contains(item -> item.isNote() && item.getName().equals("XYZ"));

  • Like 4

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...