feat: 优化结构
This commit is contained in:
@@ -146,7 +146,7 @@ public abstract class BallAPI {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected void disable() throws SQLException, InterruptedException {
|
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 (Connection connection = getDatasource().getConnection()) {
|
||||||
try (PreparedStatement statement = connection.prepareStatement(
|
try (PreparedStatement statement = connection.prepareStatement(
|
||||||
|
@@ -1,5 +1,6 @@
|
|||||||
package cn.hamster3.mc.plugin.ball.common.event.server;
|
package cn.hamster3.mc.plugin.ball.common.event.server;
|
||||||
|
|
||||||
|
import cn.hamster3.mc.plugin.ball.common.entity.BallServerInfo;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
@@ -11,5 +12,5 @@ import org.jetbrains.annotations.NotNull;
|
|||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public class ServerOfflineEvent {
|
public class ServerOfflineEvent {
|
||||||
@NotNull
|
@NotNull
|
||||||
private final String serverID;
|
private final BallServerInfo serverInfo;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user