From bc5735b7913853360dc7a485bad1e72da9cd5300 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?MC=7E=E8=9B=9F=E9=BE=99?= <1610105206@qq.com> Date: Wed, 10 Jul 2024 21:28:46 +0800 Subject: [PATCH] Apart adventure platforms --- plugin/build.gradle.kts | 19 ++++++++----------- plugin/platform-bukkit/build.gradle.kts | 3 ++- .../authme/configruation/ConfigSection.kt | 2 +- 3 files changed, 11 insertions(+), 13 deletions(-) diff --git a/plugin/build.gradle.kts b/plugin/build.gradle.kts index 2d76b63c..37f0d5a9 100644 --- a/plugin/build.gradle.kts +++ b/plugin/build.gradle.kts @@ -26,6 +26,9 @@ subprojects { implementation(project(":project:module-logger")) implementation(project(":project:module-configuration")) implementation(project(":project:module-message")) + // Adventure API + implementation("net.kyori:adventure-text-minimessage:4.17.0") + implementation("net.kyori:adventure-text-serializer-gson:4.17.0") // Spigot API, https://www.spigotmc.org/ compileOnly("org.spigotmc:spigot-api:1.20.6-R0.1-SNAPSHOT") // Java Libraries @@ -73,10 +76,6 @@ subprojects { implementation("org.bstats:bstats-bukkit:3.0.2") // ProtocolLib compileOnly("com.comphenix.protocol:ProtocolLib:5.1.0") - // Adventure API - implementation("net.kyori:adventure-text-minimessage:4.17.0") - implementation("net.kyori:adventure-text-serializer-gson:4.17.0") - implementation("net.kyori:adventure-platform-bukkit:4.3.2") // LuckPerms plugin compileOnly("net.luckperms:api:5.4") // PermissionsEx plugin @@ -122,6 +121,10 @@ subprojects { destinationDirectory.set(file("$rootDir/outs")) // Kotlin relocate("kotlin.", "kolin200.") + // Adventure + relocate("net.kyori.adventure", "fr.xephi.authme.libs.net.kyori.adventure") + relocate("net.kyori.examination", "fr.xephi.authme.libs.net.kyori.examination") + relocate("net.kyori.option", "fr.xephi.authme.libs.net.kyori.option") // Others relocate("org.apache.http", "fr.xephi.authme.libs.org.apache.http") relocate("org.apache.commons", "fr.xephi.authme.libs.org.apache.commons") @@ -153,18 +156,12 @@ subprojects { // bStats metrics class relocate("org.bstats", "fr.xephi.authme.libs.org.bstats") relocate("org.mariadb.jdbc", "fr.xephi.authme.libs.org.mariadb.jdbc") - relocate( - "com.github.Anon8281.universalScheduler", - "fr.xephi.authme.libs.com.github.Anon8281.universalScheduler" - ) + relocate("com.github.Anon8281.universalScheduler", "fr.xephi.authme.libs.com.github.Anon8281.universalScheduler") relocate("com.mysql", "fr.xephi.authme.libs.com.mysql") relocate("com.google.protobuf", "fr.xephi.authme.libs.com.google.protobuf") relocate("io.netty", "fr.xephi.authme.libs.io.netty") relocate("org.apache.commons.validator", "fr.xephi.authme.libs.org.apache.commons.validator") relocate("com.alessiodp.libby", "fr.xephi.authme.libs.com.alessiodp.libby") - relocate("net.kyori.adventure", "fr.xephi.authme.libs.net.kyori.adventure") - relocate("net.kyori.examination", "fr.xephi.authme.libs.net.kyori.examination") - relocate("net.kyori.option", "fr.xephi.authme.libs.net.kyori.option") } } diff --git a/plugin/platform-bukkit/build.gradle.kts b/plugin/platform-bukkit/build.gradle.kts index 54b3cb5c..34e70fe0 100644 --- a/plugin/platform-bukkit/build.gradle.kts +++ b/plugin/platform-bukkit/build.gradle.kts @@ -1,5 +1,6 @@ description = "Fork of the first authentication plugin for the Bukkit API!" dependencies { - + // Adventure Bukkit + implementation("net.kyori:adventure-platform-bukkit:4.3.2") } \ No newline at end of file diff --git a/project/module-configuration/src/main/kotlin/fr/xephi/authme/configruation/ConfigSection.kt b/project/module-configuration/src/main/kotlin/fr/xephi/authme/configruation/ConfigSection.kt index 1ab490bb..f8f3e8bd 100644 --- a/project/module-configuration/src/main/kotlin/fr/xephi/authme/configruation/ConfigSection.kt +++ b/project/module-configuration/src/main/kotlin/fr/xephi/authme/configruation/ConfigSection.kt @@ -314,7 +314,7 @@ open class ConfigSection( is Config -> unwrap(v.valueMap()) is Collection<*> -> v.map { unwrap(it) }.toList() is Map<*, *> -> v.map { it.key to unwrap(it.value) }.toMap() - is String -> StringUtil.decodeUnicode(v) + is String -> StringUtils.decodeUnicode(v) else -> v } }