Skip to content

Commit

Permalink
0.7.9: better notification when bypass mode cannot be turned on
Browse files Browse the repository at this point in the history
  • Loading branch information
3TUSK committed Aug 2, 2023
1 parent 63bcdbb commit 3cbe007
Show file tree
Hide file tree
Showing 4 changed files with 5 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.8'
version = '0.7.9'
group = 'org.teacon'
archivesBaseName = 'AreaControl-Forge-1.20'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,7 @@ public void setGlobalExempt(ServerPlayer p, boolean global) {
if (global) {
this.playersWithGlobalExempt.add(p.getGameProfile().getId());
if (!AreaChecks.isACtrlAreaBuilder(p, area, false)) {
p.displayClientMessage(Component.translatable("area_control.error.insufficient_permission_for_bypass"), false);
return;
}
if (area == null) {
Expand All @@ -295,6 +296,7 @@ public void setGlobalExempt(ServerPlayer p, boolean global) {
}
} else {
if (!AreaChecks.isACtrlAreaBuilder(p, area, false)) {
p.displayClientMessage(Component.translatable("area_control.error.insufficient_permission_for_bypass"), false);
return;
}
if (area == null) {
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/assets/area_control/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
"area_control.error.cannot_change_range": "Cannot change range for area %s because it would cause area overlapping",
"area_control.error.cannot_set_property": "AreaControl: Cannot set property for area %s because you are not authorized to do so.",
"area_control.error.cannot_set_builder": "AreaControl: Cannot add/remove builder for area %s because you are not authorized to do so.",
"area_control.error.cannot_set_tag": "AreaControl: Cannot add/remove tag for area %s because you are not authorized to do so.",
"area_control.error.insufficient_permission_for_bypass": "ACtrl: Failed to turn on bypass for current area because you are not owner or builder. For wildness, you must have ACtrl admin permission to turn on bypass for wildness.",
"area_control.error.unclaim_wildness": "AreaControl: You are in the wildness. Are you returning the wild nature to the nature itself?",
"area_control.error.unclaim_without_permission": "AreaControl: Cannot to abandon claim %s (internally as %s, %s) because it doesn't belong to you, or you are not authorized."
}
2 changes: 1 addition & 1 deletion src/main/resources/assets/area_control/lang/zh_cn.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
"area_control.error.cannot_change_range": "AreaControl:无法修改领地 %s 的范围,因为修改后的结果会和其他领地有冲突",
"area_control.error.cannot_set_property": "AreaControl:你没有修改领地 %s 的属性的权限。",
"area_control.error.cannot_set_builder": "AreaControl: 你没有修改领地 %s 的成员列表的权限。",
"area_control.error.cannot_set_tag": "AreaControl: 你没有修改领地 %s 的标签的权限",
"area_control.error.insufficient_permission_for_bypass": "ACtrl:你不是当前领地的所有者或建设者,无法为你开启当前领地的 Bypass 模式。如果你在野外,你需要 ACtrl 的管理员权限方能在野外开启 Bypass 模式",
"area_control.error.unclaim_wildness": "AreaControl:你现在身在野外,你确定要将大自然还给大自然自己吗?",
"area_control.error.unclaim_without_permission": "AreaControl:放弃领地 %s(内部名 %s,%s)失败,因为这块领地不属于你,或者你没有权限这么做。"
}

0 comments on commit 3cbe007

Please sign in to comment.