Skip to content

Commit

Permalink
style: 更改了输出的格式
Browse files Browse the repository at this point in the history
  • Loading branch information
limbang committed Dec 18, 2024
1 parent b4c8b82 commit eac09b2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main/kotlin/mirai/MinecraftListener.kt
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ object MinecraftListener : SimpleListenerHost() {
// 构建最终消息内容
val message = buildString {
responses.forEach { append(it) }
}.plus("\n").plus(getServerList())
}.plus(getServerList())

// 根据配置决定是否将消息转为图片
if (PluginData.isAllToImg) {
Expand Down Expand Up @@ -162,16 +162,16 @@ object MinecraftListener : SimpleListenerHost() {
serverStatus.toMessage(name, delay)
} catch (e: EOFException) {
Minecraft.logger.error("Ping服务器时遇到EOFException [$name] - 地址: $address:$port", e)
PlainText("[$name] 获取服务器状态失败:服务器响应数据格式错误")
PlainText("[$name] 获取服务器状态失败:服务器响应数据格式错误\n\n")
} catch (e: IOException) {
Minecraft.logger.error("Ping服务器时遇到IOException [$name] - 地址: $address:$port", e)
PlainText("[$name] 获取服务器状态失败:I/O错误")
PlainText("[$name] 获取服务器状态失败:I/O错误\n\n")
} catch (e: Exception) {
Minecraft.logger.error(
"Ping服务器时遇到未知错误 [$name] - 地址: $address:$port - 错误信息: ${e.message}",
e
)
PlainText("[$name] 获取服务器状态失败:${e.message}")
PlainText("[$name] 获取服务器状态失败:${e.message}\n\n")
}
}

Expand Down

0 comments on commit eac09b2

Please sign in to comment.