将“领地没有传送点”警告从控制台警告修改为玩家消息提示警告
Some checks failed
Java CI-CD with Maven / build (push) Has been cancelled

This commit is contained in:
zhangyuheng 2024-07-06 20:08:40 +08:00
parent f08e0f51e2
commit 0e1eb53465
2 changed files with 3 additions and 3 deletions

View File

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

View File

@ -433,10 +433,10 @@ public class DominionOperate {
World world = Dominion.instance.getServer().getWorld(dominionDTO.getWorld()); World world = Dominion.instance.getServer().getWorld(dominionDTO.getWorld());
if (location == null) { if (location == null) {
location = new Location(world, center_x, player.getLocation().getY(), center_z); location = new Location(world, center_x, player.getLocation().getY(), center_z);
XLogger.warn("领地 %s 没有设置传送点,将尝试传送到中心点", dominionDTO.getName()); Notification.warn(player, "领地 %s 没有设置传送点,将尝试传送到中心点", dominionDTO.getName());
} else if (!isInDominion(dominionDTO, location)) { } else if (!isInDominion(dominionDTO, location)) {
location = new Location(world, center_x, player.getLocation().getY(), center_z); location = new Location(world, center_x, player.getLocation().getY(), center_z);
XLogger.warn("领地 %s 传送点不在领地内,将尝试传送到中心点", dominionDTO.getName()); Notification.warn(player, "领地 %s 传送点不在领地内,将尝试传送到中心点", dominionDTO.getName());
} }
if (player.isOnline()) { if (player.isOnline()) {
Teleport.doTeleportSafely(player, location).thenAccept(b -> { Teleport.doTeleportSafely(player, location).thenAccept(b -> {