Skip to content

Commit

Permalink
Added option to ignore the island center block from limits.
Browse files Browse the repository at this point in the history
Should help with AOneBlock usage.
  • Loading branch information
tastybento committed Oct 17, 2021
1 parent 945aae0 commit 328a1a1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,10 @@ private int process(Block b, boolean add) {
// 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
Expand Down
4 changes: 4 additions & 0 deletions src/main/resources/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 328a1a1

Please sign in to comment.