Skip to content

Commit

Permalink
fix: fix internal class
Browse files Browse the repository at this point in the history
  • Loading branch information
PeratX committed Nov 12, 2022
1 parent d1ce0bc commit f2ba2e1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/kotlin/org/itxtech/mcl/addon/fix.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import net.mamoe.mirai.console.ConsoleFrontEndImplementation
import net.mamoe.mirai.console.MiraiConsoleImplementation
import net.mamoe.mirai.console.data.Value
import net.mamoe.mirai.console.data.findBackingFieldValue
import net.mamoe.mirai.console.internal.data.builtins.PluginDependenciesConfig
import net.mamoe.mirai.console.terminal.consoleLogger
import net.mamoe.mirai.console.util.ConsoleExperimentalApi
import org.itxtech.mcl.Loader
Expand Down Expand Up @@ -94,7 +93,8 @@ private fun updateMiraiConsoleLoader(maven: String, version: String): Boolean {
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE", "UNCHECKED_CAST")
fun fixMiraiConsole() {
with(MiraiConsoleImplementation.getInstance()) {
val config = consoleDataScope.get(PluginDependenciesConfig::class)
val config =
consoleDataScope.get(net.mamoe.mirai.console.internal.data.builtins.PluginDependenciesConfig::class)
if (config.repoLoc.singleOrNull().orEmpty().startsWith("https://maven.aliyun.com")) {
val field = config.findBackingFieldValue(config::repoLoc) as Value<List<String>>
field.value += "https://repo.huaweicloud.com/repository/maven"
Expand Down

0 comments on commit f2ba2e1

Please sign in to comment.