修复了领地转让数据库不更新的问题

This commit is contained in:
zhangyuheng 2024-02-28 14:19:56 +08:00
parent 4af0ba761d
commit 33b80884d9
3 changed files with 3 additions and 1 deletions

View File

@ -6,7 +6,7 @@
<groupId>cn.lunadeer</groupId>
<artifactId>Dominion</artifactId>
<version>1.11.3-beta</version>
<version>1.11.5-beta</version>
<packaging>jar</packaging>
<name>Dominion</name>

View File

@ -484,6 +484,7 @@ public class DominionController {
Notification.warn(operator, "输入 /dominion give " + dom_name + " " + player_name + " force 确认转让");
return;
}
dominion.setOwner(player.getUuid());
for (DominionDTO sub_dominion : sub_dominions) {
sub_dominion.setOwner(player.getUuid());
}

View File

@ -168,6 +168,7 @@ public class DominionDTO {
private static DominionDTO update(DominionDTO dominion) {
String sql = "UPDATE dominion SET " +
"owner = '" + dominion.getOwner().toString() + "', " +
"name = '" + dominion.getName() + "', " +
"world = '" + dominion.getWorld() + "', " +
"x1 = " + dominion.getX1() + ", " +