Compare commits
3 Commits
4d3d93887d
...
1.7.1
Author | SHA1 | Date | |
---|---|---|---|
2a4a3e9065 | |||
69432dbbc8 | |||
20f395fa45 |
@@ -49,9 +49,9 @@ repositories {
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
// 对于 Bukkit 插件
|
// 对于 Bukkit 插件
|
||||||
compileOnly("cn.hamster3.mc.plugin:ball-bukkit:1.7.0-SNAPSHOT")
|
compileOnly("cn.hamster3.mc.plugin:ball-bukkit:1.7.0")
|
||||||
// 对于 BungeeCord 插件
|
// 对于 BungeeCord 插件
|
||||||
compileOnly("cn.hamster3.mc.plugin:ball-bungee:1.7.0-SNAPSHOT")
|
compileOnly("cn.hamster3.mc.plugin:ball-bungee:1.7.0")
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -77,13 +77,13 @@ dependencies {
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>cn.hamster3.mc.plugin</groupId>
|
<groupId>cn.hamster3.mc.plugin</groupId>
|
||||||
<artifactId>ball-bukkit</artifactId>
|
<artifactId>ball-bukkit</artifactId>
|
||||||
<version>1.7.0-SNAPSHOT</version>
|
<version>1.7.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!--对于 BungeeCord 插件-->
|
<!--对于 BungeeCord 插件-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>cn.hamster3.mc.plugin</groupId>
|
<groupId>cn.hamster3.mc.plugin</groupId>
|
||||||
<artifactId>ball-bungee</artifactId>
|
<artifactId>ball-bungee</artifactId>
|
||||||
<version>1.7.0-SNAPSHOT</version>
|
<version>1.7.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</project>
|
</project>
|
||||||
|
@@ -140,7 +140,10 @@ public abstract class BallAPI {
|
|||||||
") CHARSET utf8mb4;");
|
") CHARSET utf8mb4;");
|
||||||
statement.execute("CREATE TABLE IF NOT EXISTS `hamster_ball_cached_message`(" +
|
statement.execute("CREATE TABLE IF NOT EXISTS `hamster_ball_cached_message`(" +
|
||||||
"`uuid` CHAR(36) NOT NULL," +
|
"`uuid` CHAR(36) NOT NULL," +
|
||||||
"`message` TEXT NOT NULL" +
|
"`message` TEXT NOT NULL," +
|
||||||
|
"`time` DATETIME NOT NULL DEFAULT NOW()," +
|
||||||
|
"INDEX `idx_uuid` USING BTREE (`uuid`)," +
|
||||||
|
"INDEX `idx_time` USING BTREE (`time`)" +
|
||||||
") CHARSET utf8mb4;");
|
") CHARSET utf8mb4;");
|
||||||
}
|
}
|
||||||
if (getBallConfig().isGameServerUpdatePlayerInfo()) {
|
if (getBallConfig().isGameServerUpdatePlayerInfo()) {
|
||||||
@@ -329,7 +332,7 @@ public abstract class BallAPI {
|
|||||||
}
|
}
|
||||||
try (Connection connection = getDatasource().getConnection()) {
|
try (Connection connection = getDatasource().getConnection()) {
|
||||||
try (PreparedStatement statement = connection.prepareStatement(
|
try (PreparedStatement statement = connection.prepareStatement(
|
||||||
"INSERT INTO `hamster_ball_cached_message` VALUES(?, ?);"
|
"INSERT INTO `hamster_ball_cached_message` VALUES(?, ?, DEFAULT);"
|
||||||
)) {
|
)) {
|
||||||
statement.setString(1, receiver.toString());
|
statement.setString(1, receiver.toString());
|
||||||
statement.setString(2, message.toJson().toString());
|
statement.setString(2, message.toJson().toString());
|
||||||
|
@@ -7,6 +7,8 @@ import cn.hamster3.mc.plugin.core.common.api.CoreAPI;
|
|||||||
import com.google.common.eventbus.EventBus;
|
import com.google.common.eventbus.EventBus;
|
||||||
import redis.clients.jedis.JedisPubSub;
|
import redis.clients.jedis.JedisPubSub;
|
||||||
|
|
||||||
|
import java.util.logging.Level;
|
||||||
|
|
||||||
public class BallRedisListener extends JedisPubSub {
|
public class BallRedisListener extends JedisPubSub {
|
||||||
public static final BallRedisListener INSTANCE = new BallRedisListener();
|
public static final BallRedisListener INSTANCE = new BallRedisListener();
|
||||||
|
|
||||||
@@ -32,7 +34,7 @@ public class BallRedisListener extends JedisPubSub {
|
|||||||
}
|
}
|
||||||
eventBus.post(new MessageReceivedEvent(finalChannel, ballMessage));
|
eventBus.post(new MessageReceivedEvent(finalChannel, ballMessage));
|
||||||
} catch (Exception | Error e) {
|
} catch (Exception | Error e) {
|
||||||
e.printStackTrace();
|
BallAPI.getInstance().getLogger().log(Level.SEVERE, "解析来自频道 " + channel + " 的数据出错: " + message, e);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@@ -5,7 +5,7 @@ plugins {
|
|||||||
}
|
}
|
||||||
|
|
||||||
group = "cn.hamster3.mc.plugin"
|
group = "cn.hamster3.mc.plugin"
|
||||||
version = "1.7.0-SNAPSHOT"
|
version = "1.7.1"
|
||||||
description = "基于 Redis 的 Minecraft 服务端通用消息中间件"
|
description = "基于 Redis 的 Minecraft 服务端通用消息中间件"
|
||||||
|
|
||||||
subprojects {
|
subprojects {
|
||||||
|
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,6 +1,6 @@
|
|||||||
#Sun Aug 20 16:53:32 CST 2023
|
#Sun Aug 20 16:53:32 CST 2023
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
Reference in New Issue
Block a user