mirror of
https://github.com/BentoBoxWorld/Limits.git
synced 2024-09-27 14:12:57 +02:00
This commit is contained in:
parent
fbf13bd99e
commit
90b5a65c62
@ -443,6 +443,14 @@ public class EntityLimitListener implements Listener {
|
|||||||
return new AtLimitResult(ent.getType(), limitAmount);
|
return new AtLimitResult(ent.getType(), limitAmount);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Merge in any permission-based limits
|
||||||
|
if (addon.getBlockLimitListener().getIsland(island.getUniqueId()) != null) {
|
||||||
|
Map<String, EntityGroup> groupbyname = groupsLimits.keySet().stream().collect(Collectors.toMap(e -> e.getName(), e -> e));
|
||||||
|
addon.getBlockLimitListener().getIsland(island.getUniqueId()).getEntityGroupLimits().entrySet().stream()
|
||||||
|
.filter(e -> groupbyname.containsKey(e.getKey()))
|
||||||
|
.forEach(e -> groupsLimits.put(groupbyname.get(e.getKey()), e.getValue()));
|
||||||
|
}
|
||||||
|
|
||||||
// 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)
|
if (group.getValue() < 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user