diff --git a/src/main/java/de/strifel/VTools/ServerCloser.java b/src/main/java/de/strifel/VTools/ServerCloser.java index 894afef..fe9a3c4 100644 --- a/src/main/java/de/strifel/VTools/ServerCloser.java +++ b/src/main/java/de/strifel/VTools/ServerCloser.java @@ -66,7 +66,10 @@ public class ServerCloser { boolean httpSuccess = false; for (int i = 0; i < 3; i++) { httpSuccess = executeAzure(); - if (httpSuccess) break; + if (httpSuccess) { + TGBridge.log("关机命令发送成功,正在关闭 pymcd。"); + break; + } } if (!httpSuccess) { TGBridge.error("服务器关机 http 请求失效,服务器可能没有正常关闭。"); @@ -134,7 +137,7 @@ public class ServerCloser { plugin.logger.info("ServerCloser: 即将关机。"); close(); } else { - plugin.logger.error("ServerCloser: 定时器到点时发现服务器有人。这不应发生,因为定时器本应该被打断。"); + plugin.logger.error("ServerCloser: 定时器到点时发现服务器有人。这不应发生,因为定时器本应该被打断。"); TGBridge.error("ServerCloser: #bug @NaAlOH4 定时器到点时发现服务器有人。这不应发生,因为定时器本应该被打断。"); } closeServerTimer.cancel(); diff --git a/src/main/java/de/strifel/VTools/listeners/TGBridge.java b/src/main/java/de/strifel/VTools/listeners/TGBridge.java index 7d8c6f3..01003dc 100644 --- a/src/main/java/de/strifel/VTools/listeners/TGBridge.java +++ b/src/main/java/de/strifel/VTools/listeners/TGBridge.java @@ -310,6 +310,9 @@ public class TGBridge { public static void error(String context) { INSTANCE.outbound("*" + MarkdownString.escapeStr(context) + "*", ParseMode.MarkdownV2); } + public static void log(String context) { + INSTANCE.outbound("_" + MarkdownString.escapeStr(context) + "_", ParseMode.MarkdownV2); + } protected void outbound(String content) {outbound(content, (ParseMode) null);}