Verify 0 Share Posted May 8, 2020 Hi, I am trying to have an expression that returns true if there is one or more noted item in the inventory. I tried this: if (getInventory().count(Item::isNoted) == 0) but it doesn't work. I thought Item::isNoted would be an item filter for noted items. I am not sure if I am using it right. Link to comment Share on other sites More sharing options...
NovaGTX 106 Share Posted May 8, 2020 if(getInventory().contains(i -> i != null && i.isNoted())) { } Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.