Added option to ignore the island center block from limits.

Should help with AOneBlock usage.
This commit is contained in:
tastybento 2021-10-17 14:48:35 -07:00
parent 945aae0d8b
commit 328a1a13f7
2 changed files with 8 additions and 0 deletions

View File

@ -329,6 +329,10 @@ public class BlockLimitsListener implements Listener {
// Invalid world
return -1;
}
// Ignore the center block - usually bedrock, but for AOneBlock it's the magic block
if (addon.getConfig().getBoolean("ignore-center-block", true) && i.getCenter().equals(b.getLocation())) {
return -1;
}
islandCountMap.putIfAbsent(id, new IslandBlockCount(id, gameMode));
if (add) {
// Check limit

View File

@ -4,6 +4,10 @@ gamemodes:
- BSkyBlock
- CaveBlock
# Ignore this island's center block. For most worlds, this is bedrock, but for AOneBlock it is
# the magic block, so ignoring it from limits makes sense.
ignore-center-block: true
# Permissions
# Island owners can be given permissions that override all general settings
# Format is GAME-MODE-NAME.island.limit.MATERIAL.LIMIT