Skip to content

Commit

Permalink
0.7.8: Hotfix: owner should also have priviliges of builder
Browse files Browse the repository at this point in the history
  • Loading branch information
3TUSK committed Aug 1, 2023
1 parent 251e44b commit 63bcdbb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ apply plugin: 'eclipse'
apply plugin: 'maven-publish'
apply plugin: 'org.spongepowered.mixin'

version = '0.7.7'
version = '0.7.8'
group = 'org.teacon'
archivesBaseName = 'AreaControl-Forge-1.20'

Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/teacon/areacontrol/impl/AreaChecks.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,13 @@ public static boolean isACtrlAreaBuilder(@NotNull ServerPlayer p, @Nullable Area
var uid = p.getGameProfile().getId();
var group = AreaControlAPI.groupProvider.getGroupFor(uid);
// 1. Check if player is one of builders
if (area.builders.contains(uid) || area.builderGroups.contains(group)) {
if (area.owners.contains(uid) || area.builders.contains(uid) || area.ownerGroups.contains(group) || area.builderGroups.contains(group)) {
return true;
}
// 2. If area has parent area, check if it owns parent
if (includeParent) {
var parent = AreaManager.INSTANCE.findBy(area.belongingArea);
if (parent != null && (parent.builders.contains(uid) || parent.builderGroups.contains(group))) {
if (parent != null && (parent.owners.contains(uid) || parent.builders.contains(uid) || parent.ownerGroups.contains(group) || parent.builderGroups.contains(group))) {
return true;
}
}
Expand Down

0 comments on commit 63bcdbb

Please sign in to comment.