feat: 优化结构

This commit is contained in:
2023-11-12 17:18:57 +08:00
parent a47e821868
commit dc9f24ffdb
2 changed files with 3 additions and 2 deletions

View File

@@ -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(

View File

@@ -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;
}