Skip to content

Commit

Permalink
fix group limits when limit is -1
Browse files Browse the repository at this point in the history
  • Loading branch information
weaondara committed Apr 12, 2020
1 parent 346f2b8 commit cc6781b
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,8 @@ private AtLimitResult atLimit(Island island, Entity ent) {

// Now do the group limits
for (Map.Entry<Settings.EntityGroup, Integer> group : groupsLimits.entrySet()) { //do not use lambda
if (group.getValue() < 0)
continue;
count = (int) ent.getWorld().getEntities().stream()
.filter(e -> group.getKey().contains(e.getType()))
.filter(e -> island.inIslandSpace(e.getLocation())).count();
Expand Down

0 comments on commit cc6781b

Please sign in to comment.