fix group limits when limit is -1

This commit is contained in:
wea_ondara 2020-04-12 13:38:21 +02:00
parent 346f2b8ed8
commit cc6781bf44
1 changed files with 2 additions and 0 deletions

View File

@ -225,6 +225,8 @@ public class EntityLimitListener implements Listener {
// 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();