diff --git a/build.gradle.kts b/build.gradle.kts index a876c76..44c3950 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,10 +1,11 @@ plugins { java - id("com.github.johnrengelman.shadow") version "6.0.0" + kotlin("jvm") version "1.3.72" + id("me.bristermitten.pdm") version "0.0.1" } group = "com.github.johnnyjayjay" -version = "1.0" +version = "0.1.0" repositories { maven("https://hub.spigotmc.org/nexus/content/repositories/snapshots/") @@ -16,7 +17,7 @@ repositories { dependencies { compileOnly("org.spigotmc:spigot:1.8.8-R0.1-SNAPSHOT") - implementation("com.github.johnnyjayjay:compatre:master-SNAPSHOT") + pdm("com.github.johnnyjayjay:compatre:master-SNAPSHOT") } tasks { diff --git a/src/main/java/com/github/johnnyjayjay/presents/PresentPlugin.java b/src/main/java/com/github/johnnyjayjay/presents/PresentPlugin.java index 2f7c83b..5064e8d 100644 --- a/src/main/java/com/github/johnnyjayjay/presents/PresentPlugin.java +++ b/src/main/java/com/github/johnnyjayjay/presents/PresentPlugin.java @@ -4,6 +4,7 @@ import com.github.johnnyjayjay.presents.command.*; import com.github.johnnyjayjay.presents.conversation.StartPrompt; import com.google.common.collect.ImmutableMap; +import me.bristermitten.pdm.PluginDependencyManager; import org.bukkit.Bukkit; import org.bukkit.configuration.ConfigurationSection; import org.bukkit.configuration.serialization.ConfigurationSerialization; @@ -15,12 +16,15 @@ */ public class PresentPlugin extends JavaPlugin { - static { + private PresentLocations presentLocations; + + @Override + public void onLoad() { + PluginDependencyManager dependencyManager = new PluginDependencyManager(this); + dependencyManager.loadAllDependencies().join(); NmsClassLoader.loadAllInClasspath(); } - private PresentLocations presentLocations; - @Override public void onEnable() { getLogger().info("Registering present serialisation..."); diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index a89c312..dc041fe 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -1,6 +1,6 @@ main: com.github.johnnyjayjay.presents.PresentPlugin name: Presents -version: '1.0' +version: '0.1.0' commands: present: