@Override public boolean isEnabled(Player self, Likeness action) { if (action == Likeness.Action) { return self.columnStream().parallel().anyMatch(this::isValidRent); } return true; }
@Override public boolean actionPlayed(Player self) { int rent = self.columnStream() .parallel() .filter(this::isValidRent) .mapToInt(PropertyColumn::getRent) .max() .orElse(0); if (rent == 0) { return false; } return payRequest(self, isGlobal(), rent, "rent"); }