Add limits offsets to the GUI and Placeholder

Offsets were not added to the GUI and Placeholder value. Part of #159
This commit is contained in:
BONNe 2022-03-27 14:45:43 +03:00 committed by GitHub
parent b459f8bdb5
commit 5fd461ddea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -431,7 +431,12 @@ public class BlockLimitsListener implements Listener {
}
// Island
if (islandCountMap.containsKey(id)) {
result.putAll(islandCountMap.get(id).getBlockLimits());
IslandBlockCount islandBlockCount = islandCountMap.get(id);
result.putAll(islandBlockCount.getBlockLimits());
// Add offsets to the every limit.
islandBlockCount.getBlockLimitsOffset().forEach((material, offset) ->
result.put(material, result.getOrDefault(material, 0) + offset));
}
return result;
}