Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

Sign up now!
RuneMate will permanently shut down on August 7, 2026
due to events outside our control. You can continue using RuneMate until this date after which it will no longer be available. Thank you to everyone that contributed to RuneMate's success and to the community for the opportunity to serve you all these years.

  • Learn about RuneMate Vault and how its zero knowledge local encryption already protects your sensitive information.
  • Edit or delete your RuneMate account from your Account Settings.
  • All account upgrade subscriptions have been cancelled. No action required.

Resolved Inventory#containsOnly()

Conelander
Joined
Oct 30, 2014
Messages
4,078
Inventory#containsOnly() returns true when the inventory is empty.

RS3 not confirmed.
 
Engineer
Joined
Jul 28, 2013
Messages
2,776
That seems like desired behavior, it doesn't contain any items that aren't the specified items. Use containsOnly and containsAllOf or containsAnyOf depending on what behavior you want.
 
Conelander
Joined
Oct 30, 2014
Messages
4,078
That seems like desired behavior, it doesn't contain any items that aren't the specified items. Use containsOnly and containsAllOf or containsAnyOf depending on what behavior you want.
But the method is called containsOnly, if the inventory contains nothing, then it doesn't contain?
 
Engineer
Joined
Jul 28, 2013
Messages
2,776
But the method is called containsOnly, if the inventory contains nothing, then it doesn't contain?
It contains only items within the given array, even if there aren't technically any items in the inventory. Anything it does contain is within the given array.
 
Top