补充DominionDTO中缺失的方法

This commit is contained in:
zhangyuheng 2024-07-08 01:24:24 +08:00
parent 9997fc12a9
commit c858332fbd
2 changed files with 14 additions and 0 deletions

View File

@ -29,6 +29,10 @@ public class DominionController {
return DominionDTO.selectAll(owner.getUniqueId());
}
public static List<DominionDTO> all() {
return DominionDTO.selectAll();
}
/**
* 创建领地
*

View File

@ -373,6 +373,16 @@ public class DominionDTO {
return doUpdate(new UpdateRow().field(this.x1).field(this.y1).field(this.z1).field(this.x2).field(this.y2).field(this.z2));
}
public DominionDTO setXYZ(int[] cords) {
if (cords.length == 6) {
return setXYZ(cords[0], cords[1], cords[2], cords[3], cords[4], cords[5]);
} else {
XLogger.warn("领地坐标数据异常: %s", (Object) cords);
return null;
}
}
public Location getTpLocation() {
if (Objects.equals(tp_location.value, "default")) {
return null;