Reform dependency structure.

This commit is contained in:
2023-02-07 04:52:54 -05:00
parent eb587dc299
commit d335a0b63f
36 changed files with 121 additions and 98 deletions

View File

@ -7,5 +7,6 @@ dependencies {
exclude(module = "opus-java")
}
compileOnly(project(":foundation-core"))
implementation(project(":common-plugin"))
compileOnly(project(":foundation-shared"))
}

View File

@ -2,10 +2,8 @@ package gay.pizza.foundation.bifrost
import com.charleskorn.kaml.Yaml
import gay.pizza.foundation.bifrost.model.BifrostConfig
import gay.pizza.foundation.common.PluginMainClass
import gay.pizza.foundation.core.FoundationCorePlugin
import gay.pizza.foundation.core.Util
import gay.pizza.foundation.common.AdvancementTitleCache
import gay.pizza.foundation.common.FoundationCoreLoader
import gay.pizza.foundation.shared.*
import io.papermc.paper.event.player.AsyncChatEvent
import net.dv8tion.jda.api.EmbedBuilder
import net.dv8tion.jda.api.JDA
@ -38,11 +36,8 @@ class FoundationBifrostPlugin : JavaPlugin(), DiscordEventListener, BukkitEventL
override fun onEnable() {
isDev = description.version == "DEV"
val foundation = server.pluginManager.getPlugin("Foundation") as FoundationCorePlugin
slF4JLogger.info("Plugin data path: ${foundation.pluginDataPath}")
val configPath = Util.copyDefaultConfig<FoundationBifrostPlugin>(
val foundation = FoundationCoreLoader.get(server)
val configPath = copyDefaultConfig<FoundationBifrostPlugin>(
slF4JLogger,
foundation.pluginDataPath,
"bifrost.yaml"