This commit is contained in:
parent
a8e36f4759
commit
c30e5d9d66
2
pom.xml
2
pom.xml
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
<groupId>cn.lunadeer</groupId>
|
<groupId>cn.lunadeer</groupId>
|
||||||
<artifactId>Dominion</artifactId>
|
<artifactId>Dominion</artifactId>
|
||||||
<version>1.30.10-beta</version>
|
<version>1.30.11-beta</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<name>Dominion</name>
|
<name>Dominion</name>
|
||||||
|
@ -141,14 +141,18 @@ public class Cache {
|
|||||||
// Notification.info(player, "您已离开领地:%s", last_dominion.getName());
|
// Notification.info(player, "您已离开领地:%s", last_dominion.getName());
|
||||||
// else
|
// else
|
||||||
// Notification.info(player, "您已离开子领地:%s", last_dominion.getName());
|
// Notification.info(player, "您已离开子领地:%s", last_dominion.getName());
|
||||||
player.sendActionBar(Component.text(last_dominion.getLeaveMessage()));
|
String msg = last_dominion.getLeaveMessage();
|
||||||
|
msg = msg.replace("${DOM_NAME}", last_dominion.getName());
|
||||||
|
player.sendActionBar(Component.text(msg));
|
||||||
}
|
}
|
||||||
if (current_dom_id != -1) {
|
if (current_dom_id != -1) {
|
||||||
// if (current_dominion.getParentDomId() == -1)
|
// if (current_dominion.getParentDomId() == -1)
|
||||||
// Notification.info(player, "您正在进入领地:%s", current_dominion.getName());
|
// Notification.info(player, "您正在进入领地:%s", current_dominion.getName());
|
||||||
// else
|
// else
|
||||||
// Notification.info(player, "您正在进入子领地:%s", current_dominion.getName());
|
// Notification.info(player, "您正在进入子领地:%s", current_dominion.getName());
|
||||||
player.sendActionBar(Component.text(current_dominion.getJoinMessage()));
|
String msg = current_dominion.getJoinMessage();
|
||||||
|
msg = msg.replace("${DOM_NAME}", current_dominion.getName());
|
||||||
|
player.sendActionBar(Component.text(msg));
|
||||||
}
|
}
|
||||||
|
|
||||||
lightOrNot(player, current_dominion); // 发光检查
|
lightOrNot(player, current_dominion); // 发光检查
|
||||||
|
@ -111,12 +111,12 @@ public class DominionDTO {
|
|||||||
for (Flag f : Flag.getAllDominionFlags()) {
|
for (Flag f : Flag.getAllDominionFlags()) {
|
||||||
sql += f.getFlagName() + ", ";
|
sql += f.getFlagName() + ", ";
|
||||||
}
|
}
|
||||||
sql += "tp_location";
|
sql += "tp_location, join_message, leave_message";
|
||||||
sql += ") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ";
|
sql += ") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ";
|
||||||
for (Flag f : Flag.getAllDominionFlags()) {
|
for (Flag f : Flag.getAllDominionFlags()) {
|
||||||
sql += f.getDefaultValue() + ", ";
|
sql += f.getDefaultValue() + ", ";
|
||||||
}
|
}
|
||||||
sql += "'default'";
|
sql += "'default', ?, ?)";
|
||||||
sql += ") RETURNING *;";
|
sql += ") RETURNING *;";
|
||||||
List<DominionDTO> dominions = query(sql,
|
List<DominionDTO> dominions = query(sql,
|
||||||
dominion.getOwner(),
|
dominion.getOwner(),
|
||||||
@ -127,7 +127,10 @@ public class DominionDTO {
|
|||||||
dominion.getZ1(),
|
dominion.getZ1(),
|
||||||
dominion.getX2(),
|
dominion.getX2(),
|
||||||
dominion.getY2(),
|
dominion.getY2(),
|
||||||
dominion.getZ2());
|
dominion.getZ2(),
|
||||||
|
"欢迎来到 ${DOM_NAME}!",
|
||||||
|
"你正在离开 ${DOM_NAME},欢迎下次光临~"
|
||||||
|
);
|
||||||
if (dominions.size() == 0) return null;
|
if (dominions.size() == 0) return null;
|
||||||
return dominions.get(0);
|
return dominions.get(0);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user