Vilius Posted September 13, 2015 Share Posted September 13, 2015 So I get an error with looting filter what am I doing wrong? GroundItem ashes = groundItems.closest(new Filter<GroundItem>() { @Override public boolean match(GroundItem groundItem) { return groundItem != null && groundItem.getName().equals("Raw trout && Raw salmon") && ZONE.contains(groundItem); } }); How do I fix that? Quote Link to comment Share on other sites More sharing options...
Chris Posted September 13, 2015 Share Posted September 13, 2015 ("Raw trout && Raw salmon") to (groundItem.getName().equals("Raw trout") || groundItem.getName().equals("Raw salmon")) B) Quote Link to comment Share on other sites More sharing options...
Deceiver Posted September 13, 2015 Share Posted September 13, 2015 && can't be applied directly in a string. logical AND == && logical OR == || here; groundItem.getName().equals("Raw trout") || groundItem.getName().equals("Raw salmon") Quote Link to comment Share on other sites More sharing options...