Jump to content
GaetanoH

Muling help

Recommended Posts

     

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
Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Recently Browsing   0 members

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