sergbot 0 Posted November 23, 2020 Or do I have to always spell out every single item of interest fully?
Hashtag 8900 Posted November 23, 2020 You can use filters. For example, to get all types of logs in your inventory, you could write something like Inventory.all(item -> item != null && item.getName().toLowerCase().contains("logs"));
TheCloakdOne 389 Posted November 23, 2020 public Filter<Entity> wildcardFilter(String name) { return (i) -> i != null && i.getName().toLowerCase().contains(name); } Always good to try and abstract common logic, the above will take a common entity and return it as a wildcard filter
Recommended Posts
Archived
This topic is now archived and is closed to further replies.