diff --git a/hamster-ball-bungeecord/src/main/java/cn/hamster3/mc/plugin/core/bungee/api/BallBungeeCordAPI.java b/hamster-ball-bungeecord/src/main/java/cn/hamster3/mc/plugin/core/bungee/api/BallBungeeCordAPI.java index fd9fa42..8f88a28 100644 --- a/hamster-ball-bungeecord/src/main/java/cn/hamster3/mc/plugin/core/bungee/api/BallBungeeCordAPI.java +++ b/hamster-ball-bungeecord/src/main/java/cn/hamster3/mc/plugin/core/bungee/api/BallBungeeCordAPI.java @@ -7,7 +7,7 @@ import cn.hamster3.mc.plugin.ball.common.entity.BallServerType; import cn.hamster3.mc.plugin.ball.common.listener.BallDebugListener; import cn.hamster3.mc.plugin.core.bungee.HamsterBallPlugin; import cn.hamster3.mc.plugin.core.bungee.listener.BallBungeeCordListener; -import cn.hamster3.mc.plugin.core.bungee.util.BungeeCordUtils; +import cn.hamster3.mc.plugin.core.bungee.util.CoreBungeeCordUtils; import net.md_5.bungee.config.Configuration; import org.jetbrains.annotations.NotNull; @@ -28,7 +28,7 @@ public class BallBungeeCordAPI extends BallAPI { return; } HamsterBallPlugin plugin = HamsterBallPlugin.getInstance(); - Configuration pluginConfig = BungeeCordUtils.getPluginConfig(plugin); + Configuration pluginConfig = CoreBungeeCordUtils.getPluginConfig(plugin); BallConfig config = new BallConfig( new BallServerInfo( pluginConfig.getString("server-info.id"), diff --git a/hamster-ball-bungeecord/src/main/java/cn/hamster3/mc/plugin/core/bungee/util/BallBungeeCordUtils.java b/hamster-ball-bungeecord/src/main/java/cn/hamster3/mc/plugin/core/bungee/util/BallBungeeCordUtils.java index 5a839d0..d7c845d 100644 --- a/hamster-ball-bungeecord/src/main/java/cn/hamster3/mc/plugin/core/bungee/util/BallBungeeCordUtils.java +++ b/hamster-ball-bungeecord/src/main/java/cn/hamster3/mc/plugin/core/bungee/util/BallBungeeCordUtils.java @@ -7,6 +7,7 @@ import cn.hamster3.mc.plugin.core.common.api.CoreAPI; import cn.hamster3.mc.plugin.core.common.util.CoreUtils; import net.md_5.bungee.api.connection.ProxiedPlayer; import net.md_5.bungee.api.connection.Server; +import org.jetbrains.annotations.NotNull; import java.sql.Connection; import java.sql.PreparedStatement; @@ -16,7 +17,8 @@ public final class BallBungeeCordUtils { private BallBungeeCordUtils() { } - public static BallPlayerInfo getPlayerInfo(ProxiedPlayer player, boolean online) { + @NotNull + public static BallPlayerInfo getPlayerInfo(@NotNull ProxiedPlayer player, boolean online) { Server server = player.getServer(); return new BallPlayerInfo( player.getUniqueId(), @@ -27,7 +29,7 @@ public final class BallBungeeCordUtils { ); } - public static void uploadPlayerInfo(BallPlayerInfo playerInfo) { + public static void uploadPlayerInfo(@NotNull BallPlayerInfo playerInfo) { CoreUtils.WORKER_EXECUTOR.execute(() -> { try (Connection connection = CoreAPI.getInstance().getConnection()) { PreparedStatement statement = connection.prepareStatement("REPLACE INTO `hamster_ball_player_info` VALUES(?, ?, ?, ?, ?);");