Jump to content

Inventory contains all items


Recommended Posts

Posted
On 3/30/2017 at 10:09 AM, Polymorphism said:

You could do something like


String[] ITEMS = ....

for(String item : ITEMS)

   if(!inventory.contains(item))

        return false



return true;

 

No need for external object to store data simply call as the following instead, you also can call Strings instead as well rather than pull the ids.

if (getInventory().contains(1042, 1050, 11694)) {
 // do stuff
}

 

Posted (edited)
14 hours ago, Booleans YAY said:

No need for external object to store data simply call as the following instead, you also can call Strings instead as well rather than pull the ids.


if (getInventory().contains(1042, 1050, 11694)) {
 // do stuff
}

 

Read the OP, this is not the same behaviour as the code the post you quoted contains. And the OP literally said the method you posted doesn't do what he needs.

Edited by Reveance
  • Like 1

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...