Skip to content

Commit

Permalink
Fix SectionPermissionChecker combination
Browse files Browse the repository at this point in the history
  • Loading branch information
Moulberry committed May 4, 2024
1 parent 2cbe23a commit 5fbadf7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ static SectionPermissionChecker combine(SectionPermissionChecker first, SectionP
if (first.noneAllowed() || second.noneAllowed()) {
return NONE_ALLOWED;
}
if (first.allAllowed()) {
if (first == ALL_ALLOWED) {
return second;
}
if (second.allAllowed()) {
if (second == ALL_ALLOWED) {
return first;
}

Expand All @@ -25,6 +25,10 @@ static SectionPermissionChecker combine(SectionPermissionChecker first, SectionP
return NONE_ALLOWED;
}

if (first.allAllowed() && second.allAllowed()) {
return new AllAllowedInBox(intersect);
}

return new SectionPermissionChecker() {
@Override
public boolean allAllowed() {
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ permissions:

axiom.allow_copying_other_plots:
description: This permission allows users to copy other user's plots
default: false # true
default: true
axiom.can_import_blocks:
description: Allows players to import schematics/blueprints into Axiom
default: true

0 comments on commit 5fbadf7

Please sign in to comment.