From 51378584abba0998c7d70addb57eb02ac9939a4a Mon Sep 17 00:00:00 2001 From: ceze88 Date: Sat, 13 Jan 2024 17:03:06 +0100 Subject: [PATCH] Migrate to dynamic dependency laoding --- pom.xml | 11 +++++++++++ .../craftaro/ultimaterepairing/UltimateRepairing.java | 10 +++++++++- .../ultimaterepairing/gui/AnvilSettingsGui.java | 2 +- .../ultimaterepairing/gui/StartConfirmGui.java | 2 +- .../ultimaterepairing/handlers/RepairHandler.java | 4 ++-- .../craftaro/ultimaterepairing/repair/RepairType.java | 2 +- .../craftaro/ultimaterepairing/settings/Settings.java | 2 +- .../com/craftaro/ultimaterepairing/utils/Methods.java | 2 +- 8 files changed, 27 insertions(+), 8 deletions(-) diff --git a/pom.xml b/pom.xml index d4b3045..b2b19a3 100644 --- a/pom.xml +++ b/pom.xml @@ -82,6 +82,17 @@ **/nms/v*/** + + **/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/ultimaterepairing/UltimateRepairing.java b/src/main/java/com/craftaro/ultimaterepairing/UltimateRepairing.java index 4d78609..bafd5c8 100644 --- a/src/main/java/com/craftaro/ultimaterepairing/UltimateRepairing.java +++ b/src/main/java/com/craftaro/ultimaterepairing/UltimateRepairing.java @@ -4,10 +4,11 @@ import com.craftaro.core.SongodaCore; import com.craftaro.core.SongodaPlugin; import com.craftaro.core.commands.CommandManager; import com.craftaro.core.configuration.Config; +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.third_party.com.cryptomorin.xseries.XMaterial; +import com.craftaro.third_party.com.cryptomorin.xseries.XMaterial; import com.craftaro.ultimaterepairing.anvil.AnvilManager; import com.craftaro.ultimaterepairing.anvil.UAnvil; import com.craftaro.ultimaterepairing.commands.CommandReload; @@ -26,7 +27,9 @@ import org.bukkit.Location; import org.bukkit.plugin.PluginManager; import java.util.Arrays; +import java.util.HashSet; import java.util.List; +import java.util.Set; public class UltimateRepairing extends SongodaPlugin { private static UltimateRepairing INSTANCE; @@ -43,6 +46,11 @@ public class UltimateRepairing extends SongodaPlugin { return INSTANCE; } + @Override + protected Set getDependencies() { + return new HashSet<>(); + } + @Override public void onPluginLoad() { INSTANCE = this; diff --git a/src/main/java/com/craftaro/ultimaterepairing/gui/AnvilSettingsGui.java b/src/main/java/com/craftaro/ultimaterepairing/gui/AnvilSettingsGui.java index 50bf249..f4bc6b4 100644 --- a/src/main/java/com/craftaro/ultimaterepairing/gui/AnvilSettingsGui.java +++ b/src/main/java/com/craftaro/ultimaterepairing/gui/AnvilSettingsGui.java @@ -1,6 +1,6 @@ package com.craftaro.ultimaterepairing.gui; -import com.craftaro.core.third_party.com.cryptomorin.xseries.XMaterial; +import com.craftaro.third_party.com.cryptomorin.xseries.XMaterial; import com.craftaro.ultimaterepairing.anvil.UAnvil; import com.craftaro.core.gui.Gui; import com.craftaro.core.gui.GuiUtils; diff --git a/src/main/java/com/craftaro/ultimaterepairing/gui/StartConfirmGui.java b/src/main/java/com/craftaro/ultimaterepairing/gui/StartConfirmGui.java index 3dbe06f..850cedd 100644 --- a/src/main/java/com/craftaro/ultimaterepairing/gui/StartConfirmGui.java +++ b/src/main/java/com/craftaro/ultimaterepairing/gui/StartConfirmGui.java @@ -1,6 +1,6 @@ package com.craftaro.ultimaterepairing.gui; -import com.craftaro.core.third_party.com.cryptomorin.xseries.XMaterial; +import com.craftaro.third_party.com.cryptomorin.xseries.XMaterial; import com.craftaro.ultimaterepairing.UltimateRepairing; import com.craftaro.ultimaterepairing.anvil.PlayerAnvilData; import com.craftaro.ultimaterepairing.utils.Methods; diff --git a/src/main/java/com/craftaro/ultimaterepairing/handlers/RepairHandler.java b/src/main/java/com/craftaro/ultimaterepairing/handlers/RepairHandler.java index ddc74d2..aa9b340 100644 --- a/src/main/java/com/craftaro/ultimaterepairing/handlers/RepairHandler.java +++ b/src/main/java/com/craftaro/ultimaterepairing/handlers/RepairHandler.java @@ -1,7 +1,7 @@ package com.craftaro.ultimaterepairing.handlers; -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.ultimaterepairing.UltimateRepairing; import com.craftaro.ultimaterepairing.anvil.PlayerAnvilData; import com.craftaro.ultimaterepairing.gui.RepairGui; diff --git a/src/main/java/com/craftaro/ultimaterepairing/repair/RepairType.java b/src/main/java/com/craftaro/ultimaterepairing/repair/RepairType.java index 546d68d..0776f1b 100644 --- a/src/main/java/com/craftaro/ultimaterepairing/repair/RepairType.java +++ b/src/main/java/com/craftaro/ultimaterepairing/repair/RepairType.java @@ -1,6 +1,6 @@ package com.craftaro.ultimaterepairing.repair; -import com.craftaro.core.third_party.com.cryptomorin.xseries.XMaterial; +import com.craftaro.third_party.com.cryptomorin.xseries.XMaterial; import com.craftaro.ultimaterepairing.UltimateRepairing; import org.bukkit.entity.Player; diff --git a/src/main/java/com/craftaro/ultimaterepairing/settings/Settings.java b/src/main/java/com/craftaro/ultimaterepairing/settings/Settings.java index dbf0955..1cfe365 100644 --- a/src/main/java/com/craftaro/ultimaterepairing/settings/Settings.java +++ b/src/main/java/com/craftaro/ultimaterepairing/settings/Settings.java @@ -1,7 +1,7 @@ package com.craftaro.ultimaterepairing.settings; import com.craftaro.core.compatibility.CompatibleMaterial; -import com.craftaro.core.third_party.com.cryptomorin.xseries.XMaterial; +import com.craftaro.third_party.com.cryptomorin.xseries.XMaterial; import com.craftaro.ultimaterepairing.UltimateRepairing; import com.craftaro.core.configuration.Config; import com.craftaro.core.configuration.ConfigSetting; diff --git a/src/main/java/com/craftaro/ultimaterepairing/utils/Methods.java b/src/main/java/com/craftaro/ultimaterepairing/utils/Methods.java index 6fc7298..9a1502c 100644 --- a/src/main/java/com/craftaro/ultimaterepairing/utils/Methods.java +++ b/src/main/java/com/craftaro/ultimaterepairing/utils/Methods.java @@ -1,7 +1,7 @@ package com.craftaro.ultimaterepairing.utils; import com.craftaro.core.compatibility.CompatibleMaterial; -import com.craftaro.core.third_party.com.cryptomorin.xseries.XMaterial; +import com.craftaro.third_party.com.cryptomorin.xseries.XMaterial; import com.craftaro.ultimaterepairing.UltimateRepairing; import com.craftaro.core.math.MathUtils; import com.craftaro.ultimaterepairing.repair.RepairType;