feat: 在 Redis 锁定服务器 ID

This commit is contained in:
2024-03-17 10:15:47 +08:00
parent 48d4e31dca
commit e48274a08c
6 changed files with 89 additions and 62 deletions

View File

@@ -27,12 +27,10 @@
为了适配 docker 环境,本插件除了从 `config.yml` 中配置服务器信息以外,还支持从环境变量中读取
| 环境变量 | 描述 | 对应 config 值 |
|:----------------------------|:-------------------|:-----------------|
| BALL_LOCAL_SERVER_IP | 本服务器 IP | server-info.host |
| BALL_LOCAL_SERVER_PORT | 本服务器端口 | server-info.port |
| BALL_LOCAL_SERVER_INFO_ID | 本服务器唯一识别码,最长 32 字符 | server-info.id |
| BALL_LOCAL_SERVER_INFO_NAME | 本服务端名称,用于展示给玩家看 | server-info.name |
| 环境变量 | 描述 | 对应 config 值 |
|:-----------------|:-------------------|:-----------------|
| BALL_SERVER_ID | 本服务器唯一识别码,最长 32 字符 | server-info.id |
| BALL_SERVER_NAME | 本服务端名称,用于展示给玩家看 | server-info.name |
# 开发
@@ -51,9 +49,9 @@ repositories {
dependencies {
// 对于 Bukkit 插件
compileOnly("cn.hamster3.mc.plugin:ball-bukkit:1.5.7")
compileOnly("cn.hamster3.mc.plugin:ball-bukkit:1.6.0")
// 对于 BungeeCord 插件
compileOnly("cn.hamster3.mc.plugin:ball-bungee:1.5.7")
compileOnly("cn.hamster3.mc.plugin:ball-bungee:1.6.0")
}
```
@@ -79,13 +77,13 @@ dependencies {
<dependency>
<groupId>cn.hamster3.mc.plugin</groupId>
<artifactId>ball-bukkit</artifactId>
<version>1.5.7</version>
<version>1.6.0</version>
</dependency>
<!--对于 BungeeCord 插件-->
<dependency>
<groupId>cn.hamster3.mc.plugin</groupId>
<artifactId>ball-bungee</artifactId>
<version>1.5.7</version>
<version>1.6.0</version>
</dependency>
</dependencies>
</project>