Skip to content

Commit

Permalink
Properly check builder status before granting bypass mode
Browse files Browse the repository at this point in the history
  • Loading branch information
3TUSK committed Jul 31, 2023
1 parent b1daab8 commit 91c705e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
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.5'
version = '0.7.6'
group = 'org.teacon'
archivesBaseName = 'AreaControl-Forge-1.20'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,9 @@ public void setGlobalExempt(ServerPlayer p, boolean global) {
}
if (global) {
this.playersWithGlobalExempt.add(p.getGameProfile().getId());
if (!AreaChecks.isACtrlAreaBuilder(p, area)) {
return;
}
if (area == null) {
this.playersWithWildnessExemption.add(playerId);
p.displayClientMessage(Component.translatable("area_control.bypass.global.wildness.on"), false);
Expand All @@ -291,6 +294,9 @@ public void setGlobalExempt(ServerPlayer p, boolean global) {
p.displayClientMessage(HOW_TO_TURN_OFF, false);
}
} else {
if (!AreaChecks.isACtrlAreaBuilder(p, area)) {
return;
}
if (area == null) {
this.playersWithWildnessExemption.add(playerId);
p.displayClientMessage(Component.translatable("area_control.bypass.local.wildness.on"), false);
Expand Down

0 comments on commit 91c705e

Please sign in to comment.