mirror of
https://github.com/BentoBoxWorld/Limits.git
synced 2024-09-27 14:12:57 +02:00
fix group limits when limit is -1
This commit is contained in:
parent
346f2b8ed8
commit
cc6781bf44
@ -225,6 +225,8 @@ public class EntityLimitListener implements Listener {
|
|||||||
|
|
||||||
// Now do the group limits
|
// Now do the group limits
|
||||||
for (Map.Entry<Settings.EntityGroup, Integer> group : groupsLimits.entrySet()) { //do not use lambda
|
for (Map.Entry<Settings.EntityGroup, Integer> group : groupsLimits.entrySet()) { //do not use lambda
|
||||||
|
if (group.getValue() < 0)
|
||||||
|
continue;
|
||||||
count = (int) ent.getWorld().getEntities().stream()
|
count = (int) ent.getWorld().getEntities().stream()
|
||||||
.filter(e -> group.getKey().contains(e.getType()))
|
.filter(e -> group.getKey().contains(e.getType()))
|
||||||
.filter(e -> island.inIslandSpace(e.getLocation())).count();
|
.filter(e -> island.inIslandSpace(e.getLocation())).count();
|
||||||
|
Loading…
Reference in New Issue
Block a user