Skip to content

Commit 5d639db

Browse files
committed
0.8.18
1 parent c71c16b commit 5d639db

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ mod_name=Area Control
3434
# The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default.
3535
mod_license=BSD-3-Clause
3636
# The mod version. See https://semver.org/
37-
mod_version=0.8.17
37+
mod_version=0.8.18
3838
# The group ID for the mod. It is only important when publishing as an artifact to a Maven repository.
3939
# This should match the base package used for the mod sources.
4040
# See https://maven.apache.org/guides/mini/guide-naming-conventions.html

src/main/java/org/teacon/areacontrol/AreaManager.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,11 @@ public boolean add(Area area, ResourceKey<Level> worldIndex, ServerPlayer actor)
325325
}
326326
// If there are overlaps, the area cannot be created
327327
if (!conflict.isEmpty()) {
328+
LOGGER.info(
329+
"Cannot add area {} from {} {} {} to {} {} {}: Conflict with {}.",
330+
area.uid, area.minX, area.minY, area.minZ, area.maxX, area.maxY, area.maxZ,
331+
conflict.stream().map(a -> a.uid == null ? "NULL" : a.uid.toString()).collect(Collectors.joining(","))
332+
);
328333
return false;
329334
}
330335
// An area can only have one parent.
@@ -349,6 +354,11 @@ public boolean add(Area area, ResourceKey<Level> worldIndex, ServerPlayer actor)
349354
}
350355
} while (!indirectParents.isEmpty());
351356
if (parent.size() > 1) {
357+
LOGGER.info(
358+
"Cannot add area {} from {} {} {} to {} {} {}: Multiple parent {}.",
359+
area.uid, area.minX, area.minY, area.minZ, area.maxX, area.maxY, area.maxZ,
360+
parent.stream().map(a -> a.uid == null ? "NULL" : a.uid.toString()).collect(Collectors.joining(","))
361+
);
352362
return false;
353363
}
354364
}
@@ -377,6 +387,11 @@ public boolean add(Area area, ResourceKey<Level> worldIndex, ServerPlayer actor)
377387
// AC admin should be able to do this.
378388
for (var child : children) {
379389
if (!AreaChecks.isACtrlAreaOwner(actor, child)) {
390+
LOGGER.info(
391+
"Cannot add area {} from {} {} {} to {} {} {}: Child permission denied {}.",
392+
area.uid, area.minX, area.minY, area.minZ, area.maxX, area.maxY, area.maxZ,
393+
child.uid == null ? "NULL" : child.uid.toString()
394+
);
380395
return false;
381396
}
382397
}

src/main/resources/assets/area_control/lang/zh_cn.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@
149149
"area_control.error.no_client_ext": "该功能需要客户端也安装 AreaControl 才能使用。",
150150
"area_control.error.direction_argument": "方向必须为 up、down、north、south、west 和 east 中的一个,但你输入的是 %s",
151151
"area_control.error.outside_selection": "AreaControl:在声明领地前,你应当站在你试图声明的领地的选择区域里。",
152-
"area_control.error.overlap": "AreaControl:你试图声明的领地和另一块领地有重叠,因此无法申领。试试别的地方?",
152+
"area_control.error.overlap": "AreaControl:你试图声明的领地和另一块领地有重叠、权限不足或有多个父领地。",
153153
"area_control.error.no_selection": "AreaControl:无法确定你要声明的领地范围,你是不是忘记标记领地范围了?",
154154
"area_control.error.cannot_change_range": "AreaControl:无法修改领地 %s 的范围,因为修改后的结果会和其他领地有冲突",
155155
"area_control.error.cannot_set_property": "AreaControl:你没有修改领地 %s 的属性的权限。",

0 commit comments

Comments
 (0)