From 17c62bcb5585721aea5ed7b7084cecf3f5eb2a59 Mon Sep 17 00:00:00 2001 From: ceze88 Date: Thu, 11 Jan 2024 16:06:03 +0100 Subject: [PATCH] Migrate to dynamic dependency loading --- pom.xml | 12 +++++++++++- .../java/com/craftaro/epicfurnaces/EpicFurnaces.java | 8 +++++++- .../craftaro/epicfurnaces/database/DataHelper.java | 4 ++-- .../craftaro/epicfurnaces/database/DataManager.java | 2 +- .../com/craftaro/epicfurnaces/furnace/Furnace.java | 4 ++-- .../epicfurnaces/furnace/FurnaceBuilder.java | 2 +- .../craftaro/epicfurnaces/furnace/levels/Level.java | 2 +- .../epicfurnaces/furnace/levels/LevelManager.java | 2 +- .../com/craftaro/epicfurnaces/gui/GUIOverview.java | 2 +- .../craftaro/epicfurnaces/gui/GUIRemoteAccess.java | 2 +- .../com/craftaro/epicfurnaces/storage/Storage.java | 2 +- 11 files changed, 29 insertions(+), 13 deletions(-) diff --git a/pom.xml b/pom.xml index 0fefa29..5b292bc 100644 --- a/pom.xml +++ b/pom.xml @@ -74,8 +74,18 @@ false **/nms/v*/** - **/third_party/** + + **/third_party/org/apache/** + **/third_party/net/kyori/** + **/third_party/com/zaxxer/** + **/third_party/org/jooq/** + **/third_party/org/mariadb/** + **/third_party/com/h2database/** + **/third_party/org/h2/** + **/third_party/com/cryptomorin/** + **/third_party/org/reactivestreams/** + diff --git a/src/main/java/com/craftaro/epicfurnaces/EpicFurnaces.java b/src/main/java/com/craftaro/epicfurnaces/EpicFurnaces.java index ce9cbdc..b3c1f08 100644 --- a/src/main/java/com/craftaro/epicfurnaces/EpicFurnaces.java +++ b/src/main/java/com/craftaro/epicfurnaces/EpicFurnaces.java @@ -9,11 +9,12 @@ import com.craftaro.core.database.Data; import com.craftaro.core.database.DatabaseConnector; import com.craftaro.core.database.MySQLConnector; import com.craftaro.core.database.SQLiteConnector; +import com.craftaro.core.dependency.Dependency; import com.craftaro.core.gui.GuiManager; import com.craftaro.core.hooks.EconomyManager; import com.craftaro.core.hooks.HologramManager; import com.craftaro.core.hooks.ProtectionManager; -import com.craftaro.core.third_party.com.cryptomorin.xseries.XMaterial; +import com.craftaro.third_party.com.cryptomorin.xseries.XMaterial; import com.craftaro.core.third_party.de.tr7zw.nbtapi.NBTItem; import com.craftaro.core.utils.TextUtils; import com.craftaro.epicfurnaces.commands.CommandBoost; @@ -91,6 +92,11 @@ public class EpicFurnaces extends SongodaPlugin { return EpicFurnaces.getPlugin(EpicFurnaces.class); } + @Override + protected Set getDependencies() { + return new HashSet<>(); + } + @Override public void onPluginLoad() { } diff --git a/src/main/java/com/craftaro/epicfurnaces/database/DataHelper.java b/src/main/java/com/craftaro/epicfurnaces/database/DataHelper.java index e22df70..01c6c93 100644 --- a/src/main/java/com/craftaro/epicfurnaces/database/DataHelper.java +++ b/src/main/java/com/craftaro/epicfurnaces/database/DataHelper.java @@ -1,8 +1,8 @@ package com.craftaro.epicfurnaces.database; import com.craftaro.core.database.Data; -import com.craftaro.core.third_party.com.cryptomorin.xseries.XMaterial; -import com.craftaro.core.third_party.org.jooq.impl.DSL; +import com.craftaro.third_party.com.cryptomorin.xseries.XMaterial; +import com.craftaro.third_party.org.jooq.impl.DSL; import com.craftaro.epicfurnaces.EpicFurnaces; import com.craftaro.epicfurnaces.furnace.Furnace; import org.bukkit.Bukkit; diff --git a/src/main/java/com/craftaro/epicfurnaces/database/DataManager.java b/src/main/java/com/craftaro/epicfurnaces/database/DataManager.java index 85451e4..aa509bd 100644 --- a/src/main/java/com/craftaro/epicfurnaces/database/DataManager.java +++ b/src/main/java/com/craftaro/epicfurnaces/database/DataManager.java @@ -2,7 +2,7 @@ package com.craftaro.epicfurnaces.database; import com.craftaro.core.compatibility.CompatibleMaterial; import com.craftaro.core.database.DatabaseConnector; -import com.craftaro.core.third_party.com.cryptomorin.xseries.XMaterial; +import com.craftaro.third_party.com.cryptomorin.xseries.XMaterial; import com.craftaro.epicfurnaces.furnace.FurnaceBuilder; import com.craftaro.epicfurnaces.EpicFurnaces; import com.craftaro.epicfurnaces.boost.BoostData; diff --git a/src/main/java/com/craftaro/epicfurnaces/furnace/Furnace.java b/src/main/java/com/craftaro/epicfurnaces/furnace/Furnace.java index 82a7a8c..a117d5e 100644 --- a/src/main/java/com/craftaro/epicfurnaces/furnace/Furnace.java +++ b/src/main/java/com/craftaro/epicfurnaces/furnace/Furnace.java @@ -8,8 +8,8 @@ import com.craftaro.core.gui.GuiManager; import com.craftaro.core.hooks.EconomyManager; import com.craftaro.core.hooks.ProtectionManager; import com.craftaro.core.math.MathUtils; -import com.craftaro.core.third_party.com.cryptomorin.xseries.XMaterial; -import com.craftaro.core.third_party.com.cryptomorin.xseries.XSound; +import com.craftaro.third_party.com.cryptomorin.xseries.XMaterial; +import com.craftaro.third_party.com.cryptomorin.xseries.XSound; import com.craftaro.epicfurnaces.EpicFurnaces; import com.craftaro.epicfurnaces.furnace.levels.Level; import com.craftaro.epicfurnaces.settings.Settings; diff --git a/src/main/java/com/craftaro/epicfurnaces/furnace/FurnaceBuilder.java b/src/main/java/com/craftaro/epicfurnaces/furnace/FurnaceBuilder.java index 2c94756..805e5da 100644 --- a/src/main/java/com/craftaro/epicfurnaces/furnace/FurnaceBuilder.java +++ b/src/main/java/com/craftaro/epicfurnaces/furnace/FurnaceBuilder.java @@ -1,6 +1,6 @@ package com.craftaro.epicfurnaces.furnace; -import com.craftaro.core.third_party.com.cryptomorin.xseries.XMaterial; +import com.craftaro.third_party.com.cryptomorin.xseries.XMaterial; import com.craftaro.epicfurnaces.furnace.levels.Level; import org.bukkit.Location; diff --git a/src/main/java/com/craftaro/epicfurnaces/furnace/levels/Level.java b/src/main/java/com/craftaro/epicfurnaces/furnace/levels/Level.java index ac05da6..1d7d77f 100644 --- a/src/main/java/com/craftaro/epicfurnaces/furnace/levels/Level.java +++ b/src/main/java/com/craftaro/epicfurnaces/furnace/levels/Level.java @@ -1,6 +1,6 @@ package com.craftaro.epicfurnaces.furnace.levels; -import com.craftaro.core.third_party.com.cryptomorin.xseries.XMaterial; +import com.craftaro.third_party.com.cryptomorin.xseries.XMaterial; import com.craftaro.epicfurnaces.EpicFurnaces; import java.util.ArrayList; diff --git a/src/main/java/com/craftaro/epicfurnaces/furnace/levels/LevelManager.java b/src/main/java/com/craftaro/epicfurnaces/furnace/levels/LevelManager.java index 592f7cf..95a338c 100644 --- a/src/main/java/com/craftaro/epicfurnaces/furnace/levels/LevelManager.java +++ b/src/main/java/com/craftaro/epicfurnaces/furnace/levels/LevelManager.java @@ -1,6 +1,6 @@ package com.craftaro.epicfurnaces.furnace.levels; -import com.craftaro.core.third_party.com.cryptomorin.xseries.XMaterial; +import com.craftaro.third_party.com.cryptomorin.xseries.XMaterial; import java.util.Collections; import java.util.Map; diff --git a/src/main/java/com/craftaro/epicfurnaces/gui/GUIOverview.java b/src/main/java/com/craftaro/epicfurnaces/gui/GUIOverview.java index e6354d9..33dd9f6 100644 --- a/src/main/java/com/craftaro/epicfurnaces/gui/GUIOverview.java +++ b/src/main/java/com/craftaro/epicfurnaces/gui/GUIOverview.java @@ -4,7 +4,7 @@ import com.craftaro.core.compatibility.CompatibleMaterial; import com.craftaro.core.gui.CustomizableGui; import com.craftaro.core.gui.GuiUtils; import com.craftaro.core.input.ChatPrompt; -import com.craftaro.core.third_party.com.cryptomorin.xseries.XMaterial; +import com.craftaro.third_party.com.cryptomorin.xseries.XMaterial; import com.craftaro.core.utils.NumberUtils; import com.craftaro.core.utils.TextUtils; import com.craftaro.core.utils.TimeUtils; diff --git a/src/main/java/com/craftaro/epicfurnaces/gui/GUIRemoteAccess.java b/src/main/java/com/craftaro/epicfurnaces/gui/GUIRemoteAccess.java index 9feb7c9..83a8949 100644 --- a/src/main/java/com/craftaro/epicfurnaces/gui/GUIRemoteAccess.java +++ b/src/main/java/com/craftaro/epicfurnaces/gui/GUIRemoteAccess.java @@ -4,7 +4,7 @@ import com.craftaro.core.compatibility.ServerVersion; import com.craftaro.core.gui.CustomizableGui; import com.craftaro.core.gui.GuiUtils; import com.craftaro.core.input.ChatPrompt; -import com.craftaro.core.third_party.com.cryptomorin.xseries.XMaterial; +import com.craftaro.third_party.com.cryptomorin.xseries.XMaterial; import com.craftaro.core.utils.TextUtils; import com.craftaro.epicfurnaces.settings.Settings; import com.craftaro.epicfurnaces.EpicFurnaces; diff --git a/src/main/java/com/craftaro/epicfurnaces/storage/Storage.java b/src/main/java/com/craftaro/epicfurnaces/storage/Storage.java index a032dff..74e9002 100644 --- a/src/main/java/com/craftaro/epicfurnaces/storage/Storage.java +++ b/src/main/java/com/craftaro/epicfurnaces/storage/Storage.java @@ -1,7 +1,7 @@ package com.craftaro.epicfurnaces.storage; import com.craftaro.core.configuration.Config; -import com.craftaro.core.third_party.com.cryptomorin.xseries.XMaterial; +import com.craftaro.third_party.com.cryptomorin.xseries.XMaterial; import com.craftaro.epicfurnaces.EpicFurnaces; import com.craftaro.epicfurnaces.boost.BoostData; import com.craftaro.epicfurnaces.furnace.Furnace;