From dc9f24ffdb880b4d9b5fdf8774ff35eab72b7ec9 Mon Sep 17 00:00:00 2001 From: MiniDay <372403923@qq.com> Date: Sun, 12 Nov 2023 17:18:57 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E7=BB=93=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/cn/hamster3/mc/plugin/ball/common/api/BallAPI.java | 2 +- .../mc/plugin/ball/common/event/server/ServerOfflineEvent.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ball-common/src/main/java/cn/hamster3/mc/plugin/ball/common/api/BallAPI.java b/ball-common/src/main/java/cn/hamster3/mc/plugin/ball/common/api/BallAPI.java index 2112ccf..56066f4 100644 --- a/ball-common/src/main/java/cn/hamster3/mc/plugin/ball/common/api/BallAPI.java +++ b/ball-common/src/main/java/cn/hamster3/mc/plugin/ball/common/api/BallAPI.java @@ -146,7 +146,7 @@ public abstract class BallAPI { } protected void disable() throws SQLException, InterruptedException { - sendBallMessage(BALL_CHANNEL, new BallMessage(BallActions.ServerOffline.name(), new ServerOfflineEvent(getLocalServerId())), true); + sendBallMessage(BALL_CHANNEL, new BallMessage(BallActions.ServerOffline.name(), new ServerOfflineEvent(localServerInfo)), true); try (Connection connection = getDatasource().getConnection()) { try (PreparedStatement statement = connection.prepareStatement( diff --git a/ball-common/src/main/java/cn/hamster3/mc/plugin/ball/common/event/server/ServerOfflineEvent.java b/ball-common/src/main/java/cn/hamster3/mc/plugin/ball/common/event/server/ServerOfflineEvent.java index 494952f..b6c4f03 100644 --- a/ball-common/src/main/java/cn/hamster3/mc/plugin/ball/common/event/server/ServerOfflineEvent.java +++ b/ball-common/src/main/java/cn/hamster3/mc/plugin/ball/common/event/server/ServerOfflineEvent.java @@ -1,5 +1,6 @@ package cn.hamster3.mc.plugin.ball.common.event.server; +import cn.hamster3.mc.plugin.ball.common.entity.BallServerInfo; import lombok.AllArgsConstructor; import lombok.Data; import org.jetbrains.annotations.NotNull; @@ -11,5 +12,5 @@ import org.jetbrains.annotations.NotNull; @AllArgsConstructor public class ServerOfflineEvent { @NotNull - private final String serverID; + private final BallServerInfo serverInfo; }