Jump to content
View in the app

A better way to browse. Learn more.

OSBot :: 2007 OSRS Botting

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

list of items not working

Featured Replies

public static String[] axes = new String[] {
		 "Iron axe",
		 "Bronze axe",
		 "Steel axe",
		 "Mithril axe",
		 "Adamant axe"
	};

I'm using the above, my question is when i use this to verify if my inventory contains the above items, why does it continue to execute when it only contains one of the items from the array

 

 

I want it to execute when it contains all of those items not just one

Edited by aftabdear

Because Inventory.contains only checks if it contains any of the given items, not all of the given items. You could try:

Arrays.stream(axes).allMatch(i -> getInventory().contains(i))

This would make sure it contains all the items in your inventory, instead of just 1.

getInventory().contains(item -> item.getName().contains("axe"));

My bad, didn't read it correctly. Lemon posted the correct answer.

Edited by The Undefeated

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.