From d3f2a516c8c19e60f5ee8ae14780bb4b24f2b9ff Mon Sep 17 00:00:00 2001
From: MiniDay <372403923@qq.com>
Date: Fri, 8 Mar 2024 15:31:58 +0800
Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=BD=93=20load-playe?=
=?UTF-8?q?r-info-filter=20=E6=9C=89=E5=A4=9A=E4=B8=AA=E6=9D=A1=E7=9B=AE?=
=?UTF-8?q?=E6=97=B6=E6=97=A0=E6=B3=95=E5=8A=A0=E8=BD=BD=E7=8E=A9=E5=AE=B6?=
=?UTF-8?q?=E6=95=B0=E6=8D=AE=E7=9A=84=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
README.md | 8 ++++----
.../cn/hamster3/mc/plugin/ball/common/api/BallAPI.java | 10 +++++-----
build.gradle.kts | 2 +-
3 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/README.md b/README.md
index 525874e..d25e42b 100644
--- a/README.md
+++ b/README.md
@@ -51,9 +51,9 @@ repositories {
dependencies {
// 对于 Bukkit 插件
- compileOnly("cn.hamster3.mc.plugin:ball-bukkit:1.5.3")
+ compileOnly("cn.hamster3.mc.plugin:ball-bukkit:1.5.7")
// 对于 BungeeCord 插件
- compileOnly("cn.hamster3.mc.plugin:ball-bungee:1.5.3")
+ compileOnly("cn.hamster3.mc.plugin:ball-bungee:1.5.7")
}
```
@@ -79,13 +79,13 @@ dependencies {
cn.hamster3.mc.plugin
ball-bukkit
- 1.5.3
+ 1.5.7
cn.hamster3.mc.plugin
ball-bungee
- 1.5.3
+ 1.5.7
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 c048ee9..f8837cf 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
@@ -128,11 +128,11 @@ public abstract class BallAPI {
}
}
if (getBallConfig().isGameServerUpdatePlayerInfo()) {
- try (PreparedStatement statement = connection.prepareStatement(
- "SELECT * FROM `hamster_ball_player_info` WHERE `proxy_server` IN (?);"
- )) {
- statement.setString(1, String.join(",", getBallConfig().getLoadPlayerInfoFilter()));
- try (ResultSet set = statement.executeQuery()) {
+ try (Statement statement = connection.createStatement()) {
+ try (ResultSet set = statement.executeQuery(String.format(
+ "SELECT * FROM `hamster_ball_player_info` WHERE `proxy_server` IN ('%s');",
+ String.join("', '", getBallConfig().getLoadPlayerInfoFilter())
+ ))) {
while (set.next()) {
UUID uuid = UUID.fromString(set.getString("uuid"));
allPlayerInfo.put(uuid, new BallPlayerInfo(uuid,
diff --git a/build.gradle.kts b/build.gradle.kts
index fbb253a..5e7e8a2 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -5,7 +5,7 @@ plugins {
}
group = "cn.hamster3.mc.plugin"
-version = "1.5.6"
+version = "1.5.7"
subprojects {
apply {