style: 优化配置和代码格式

This commit is contained in:
2023-11-03 16:57:56 +08:00
parent 77357b48d5
commit 0527101950
4 changed files with 23 additions and 5 deletions

View File

@@ -3,11 +3,17 @@ debug: false
# redis 连接配置,连接格式如下: # redis 连接配置,连接格式如下:
# redis://用户名:密码@主机名:端口/数据库索引?参数名=参数值&参数名=参数值 # redis://用户名:密码@主机名:端口/数据库索引?参数名=参数值&参数名=参数值
# 若没有设置用户名和密码,则可以省略 # 若没有设置 redis 用户名,则可以省略,以下方法三选一:
# 使用默认用户名: redis://default:密码@localhost:6379?clientName=HamsterBall
# 不写用户名: redis://:密码@localhost:6379?clientName=HamsterBall
# 只写密码: redis://密码@localhost:6379?clientName=HamsterBall
# 若没有设置 redis 用户名和密码,则可以省略:
# redis://localhost:6379?clientName=HamsterBall
# 若不设置数据库,则默认使用 0 # 若不设置数据库,则默认使用 0
# 详细信息https://github.com/lettuce-io/lettuce-core/wiki/Redis-URI-and-connection-details # 详细信息https://github.com/lettuce-io/lettuce-core/wiki/Redis-URI-and-connection-details
redis-url: "redis://localhost:6379?clientName=HamsterBall" redis-url: "redis://localhost:6379?clientName=HamsterBall"
# 本服务器信息
server-info: server-info:
# 服务器唯一识别码,最长 32 字符 # 服务器唯一识别码,最长 32 字符
# 推荐格式:全小写英文+横杠+数字尾号 # 推荐格式:全小写英文+横杠+数字尾号
@@ -16,7 +22,7 @@ server-info:
# plot-1, plot-2地皮1区地皮2区 # plot-1, plot-2地皮1区地皮2区
# resource-1, resource-2资源1区资源2区 # resource-1, resource-2资源1区资源2区
id: "test-1" id: "test-1"
# 服务端名称,用于展示给玩家看 # 服务端名称,用于展示给玩家看
name: "测试1区" name: "测试1区"
# 当前子服的内网地址 # 当前子服的内网地址
# 不填则自动获取 server.properties 文件中的设置 # 不填则自动获取 server.properties 文件中的设置

View File

@@ -6,7 +6,10 @@ dependencies {
compileOnly("cn.hamster3.mc.plugin:core-bungeecord:+") compileOnly("cn.hamster3.mc.plugin:core-bungeecord:+")
// https://mvnrepository.com/artifact/io.lettuce/lettuce-core // https://mvnrepository.com/artifact/io.lettuce/lettuce-core
implementation("io.lettuce:lettuce-core:6.2.6.RELEASE") implementation("io.lettuce:lettuce-core:6.2.6.RELEASE") {
exclude(group = "io.netty")
// exclude(group = "io.projectreactor", module = "reactor-core")
}
} }
tasks { tasks {

View File

@@ -3,15 +3,21 @@ debug: false
# redis 连接配置,连接格式如下: # redis 连接配置,连接格式如下:
# redis://用户名:密码@主机名:端口/数据库索引?参数名=参数值&参数名=参数值 # redis://用户名:密码@主机名:端口/数据库索引?参数名=参数值&参数名=参数值
# 若没有设置用户名和密码,则可以省略 # 若没有设置 redis 用户名,则可以省略,以下方法三选一:
# 使用默认用户名: redis://default:密码@localhost:6379?clientName=HamsterBall
# 不写用户名: redis://:密码@localhost:6379?clientName=HamsterBall
# 只写密码: redis://密码@localhost:6379?clientName=HamsterBall
# 若没有设置 redis 用户名和密码,则可以省略:
# redis://localhost:6379?clientName=HamsterBall
# 若不设置数据库,则默认使用 0 # 若不设置数据库,则默认使用 0
# 详细信息https://github.com/lettuce-io/lettuce-core/wiki/Redis-URI-and-connection-details # 详细信息https://github.com/lettuce-io/lettuce-core/wiki/Redis-URI-and-connection-details
redis-url: "redis://localhost:6379?clientName=HamsterBall" redis-url: "redis://localhost:6379?clientName=HamsterBall"
# 本服务器信息
server-info: server-info:
# 服务器唯一识别码,最长 32 字符 # 服务器唯一识别码,最长 32 字符
id: "BungeeCord" id: "BungeeCord"
# 服务端名称,用于展示给玩家看 # 服务端名称,用于展示给玩家看
name: "代理端" name: "代理端"
# 当前子服的地址 # 当前子服的地址
# 不填则自动设置为 0.0.0.0 # 不填则自动设置为 0.0.0.0

View File

@@ -46,6 +46,9 @@ subprojects {
} }
shadowJar { shadowJar {
relocate("io.netty", "cn.hamster3.mc.plugin.ball.lib.io.netty") relocate("io.netty", "cn.hamster3.mc.plugin.ball.lib.io.netty")
relocate("io.lettuce", "cn.hamster3.mc.plugin.ball.lib.io.lettuce")
relocate("org.reactivestreams", "cn.hamster3.mc.plugin.ball.lib.org.reactivestreams")
relocate("reactor", "cn.hamster3.mc.plugin.ball.lib.reactor")
destinationDirectory = rootProject.buildDir destinationDirectory = rootProject.buildDir
} }
build { build {