diff --git a/build.gradle.kts b/build.gradle.kts index 2d8dae3..8998652 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -27,22 +27,18 @@ allprojects { if (this.name == "paper") { dependencies { - compileOnly("org.bstats", "bstats-bukkit", "3.0.2") - - compileOnly("org.bstats", "bstats-bukkit", "3.0.2") + implementation("org.bstats", "bstats-bukkit", "3.0.2") compileOnly("com.github.MilkBowl", "VaultAPI", "1.7") { exclude("org.bukkit", "bukkit") } - - //compileOnly("me.lokka30", "treasury-api", "2.0.1-7417830-RELEASE") } } dependencies { - compileOnly("ch.jalu", "configme", "1.3.1") + implementation("ch.jalu", "configme", "1.3.1") - compileOnly("com.github.Carleslc.Simple-YAML", "Simple-Yaml", "1.8.4") { + implementation("com.github.Carleslc.Simple-YAML", "Simple-Yaml", "1.8.4") { exclude("org.yaml", "snakeyaml") } } diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts index b9bf41c..39506a1 100644 --- a/buildSrc/build.gradle.kts +++ b/buildSrc/build.gradle.kts @@ -13,7 +13,7 @@ dependencies { implementation("io.papermc.paperweight", "paperweight-userdev", "1.5.5") - implementation("com.ryderbelserion.feather", "feather-plugin", "0.0.0.4"); + implementation("com.ryderbelserion.feather", "feather-plugin", "0.0.0.4") implementation("com.modrinth.minotaur", "Minotaur", "2.8.0") } \ No newline at end of file diff --git a/core/build.gradle.kts b/core/build.gradle.kts index 36568e0..54bd8c2 100644 --- a/core/build.gradle.kts +++ b/core/build.gradle.kts @@ -21,5 +21,13 @@ tasks { archiveBaseName.set("${rootProject.name}-${project.name}") archiveClassifier.set("") mergeServiceFiles() + + listOf( + "org.bstats", + "org.simpleyaml", + "org.yaml.snakeyaml" + ).forEach { + relocate(it, "libs.$it") + } } } \ No newline at end of file diff --git a/paper/src/main/java/com/badbones69/crazyauctions/CrazyStarter.java b/paper/src/main/java/com/badbones69/crazyauctions/CrazyStarter.java index 28a39f5..700825f 100644 --- a/paper/src/main/java/com/badbones69/crazyauctions/CrazyStarter.java +++ b/paper/src/main/java/com/badbones69/crazyauctions/CrazyStarter.java @@ -4,18 +4,13 @@ import com.badbones69.crazyauctions.api.frame.PaperCore; import io.papermc.paper.plugin.bootstrap.BootstrapContext; import io.papermc.paper.plugin.bootstrap.PluginBootstrap; import io.papermc.paper.plugin.bootstrap.PluginProviderContext; -import io.papermc.paper.plugin.loader.PluginClasspathBuilder; -import io.papermc.paper.plugin.loader.PluginLoader; -import io.papermc.paper.plugin.loader.library.impl.MavenLibraryResolver; import org.bukkit.Bukkit; import org.bukkit.plugin.java.JavaPlugin; -import org.eclipse.aether.artifact.DefaultArtifact; -import org.eclipse.aether.graph.Dependency; -import org.eclipse.aether.repository.RemoteRepository; import org.jetbrains.annotations.NotNull; import com.badbones69.crazyauctions.config.types.PluginConfig; -public class CrazyStarter implements PluginBootstrap, PluginLoader { +@SuppressWarnings("ALL") +public class CrazyStarter implements PluginBootstrap { private ApiManager apiManager; @@ -32,23 +27,4 @@ public class CrazyStarter implements PluginBootstrap, PluginLoader { return new CrazyAuctions(this.apiManager, paperCore); } - - @Override - public void classloader(@NotNull PluginClasspathBuilder classpathBuilder) { - MavenLibraryResolver resolver = new MavenLibraryResolver(); - - // Configs - resolver.addDependency(new Dependency(new DefaultArtifact("ch.jalu:configme:1.3.1"), null)); - - resolver.addDependency(new Dependency(new DefaultArtifact("org.bstats:bstats-bukkit:3.0.2"), null)); - - resolver.addDependency(new Dependency(new DefaultArtifact("com.github.Carleslc.Simple-YAML:Simple-Yaml:1.8.4"), null)); - - // Repositories - resolver.addRepository(new RemoteRepository.Builder("jitpack", "default", "https://jitpack.io").build()); - resolver.addRepository(new RemoteRepository.Builder("maven2", "default", "https://repo1.maven.org/maven2").build()); - resolver.addRepository(new RemoteRepository.Builder("codemc-repo", "default", "https://repo.codemc.org/repository/maven-public/").build()); - - classpathBuilder.addLibrary(resolver); - } } \ No newline at end of file diff --git a/paper/src/main/resources/paper-plugin.yml b/paper/src/main/resources/paper-plugin.yml index 170ae17..6e817da 100644 --- a/paper/src/main/resources/paper-plugin.yml +++ b/paper/src/main/resources/paper-plugin.yml @@ -6,7 +6,6 @@ api-version: '${apiVersion}' description: '${description}' bootstrapper: '${group}.CrazyStarter' -loader: '${group}.CrazyStarter' dependencies: server: